Posts

Where in a domain model is it best to keep a reference to the current user? -

How should the current user pass the repository classes? The connection string used by the repositories requires the current user's credentials. Should each repository be replaced immediately after the user name and password pass as the controller parameters? This would mean that every domain object should be having a repository and be aware of the current user. Is it best to keep a reference to the current user in my domain model? Looking at your details, I pass the current user some kind of "ApplicationContext" object Will happen. It will be similar to ATP.NET in the form of the HTTC Contex / session or any kind of singleton form.

stored procedures - How can I copy all fields of one table to another, wider table in SQL Server 2005 Express? -

I know that my title is not quite right, so make me clear. I'm using SQL Server 2005 Express. I have a table that basically stores "template", if you do. Using a car as an example, the field will look something like this: Template ID color make model Now, I have another table that The template "represents the instance" contains all the fields in the template table and some fields that are unique to an example: Instant VIN Serial Number Color Make Model I'm typing a new row in the "Instance" table Stored procedure Alne will input parameters for the stored procedure "VIN" and "serial number", but I want to copy it to the appropriate "template" and "color", "make" and "model". The template is located by "Template ID", which is already known. I am looking for advice on how to write this stored procedure. It would be easy if this is not the fact that 100 fields in ...

PeopleSoft Crystal process remains queued if part of PSJob -

I'm being mad with some people, which I'm scheduling. Job group and PSJbS crystal processes with crystal will not initiate the process (or I'm trying any other Cyrstal process) if independently scheduled but PSJob or job form with any of the crystal job conditions before they Living = Queued. I have spent Google one day reading Metallank, etc. Anyone got any ideas? Cheers Carl I did this when it worked on the Unix process scheduler And, as you probably know, the crystal will only run on a window process scheduler, the solution was to force the entire task to run on a window process scheduler.

javascript - Cross domain and google CDN for jquery -

Google does not use CDN to break jquery rules on not using cross domain requests on a web page Do you rely on Google to do enough? The use of script tags from any foreign website is allowed to own the browser because it is believed that you Want to load functionality? The loaded scripts are not able to directly communicate with the foreign domain (except for the CRS, the core of the XHR), it is just that you do not want to allow for un-checked user input, Can load a script from It is possible for a foreign script that you do not want, but if it is from a reliable source, then it should be fine. If Google was caught in order to use injections through his CDN, there would be serious reactions, and I suspect that it will happen anytime, and if this happens, then faster than that You will also be rectified as much as you will pay attention to this issue.

newline - awk won't print new line characters -

I am using the code below to replace the existing code so that I can get more and more cases with a simple command Can add ancho 'ajek' {if ("# $ 1") = "\" "$ 0" \ n "} and {print $ 0"}} 'Tf.a Note that the first print "pref" is "$ 1" '= 0 \ n " so it is referring to the variable $ 1 In your environment, no awk . Command ./tfb.a "c" should be replaced with code: BEGIN {# append1} ... to: BEGIN {prefc = 0 # append1} ... Does anyone know why this is? If you take awk out of the equation, then you can see what's happening: # Use a small test file Which is an awk script $ cat xxx hello there $ echo `cat xxx` hello is e $ echo" cat xxx` "hello there $ echo" $ (cat xxx) "hello there $ The backtick operator quickly expands the output in the shell "words". You can play with the $ IFS variable in the shell (yoke), or you can onl...

unicode - MonoTouch Comparing Strings -

I have an app that lists many languages. In the app I compare language names. When I do not compare the names of languages ​​with any accent, it works and its comparison is correct. When I compare languages ​​with accents, it does not seem that they are equal. In this case they are not equal (but must be). language = "español"; MonoTouch.Foundation.NSString s = New MonoTouch.Foundation.NSString (language); MonoTouch.Foundation.NSString = New MonoTouch.Foundation.NSString ("Español"); In this example, they are equal (notice not accent). language = "Deutsch"; MonoTouch.Foundation.NSString s = New MonoTouch.Foundation.NSString (language); MonoTouch.Foundation.NSString = New MonoTouch.Foundation.NSString ("Deutsch"); I have tried the cultures, no benefit. Am I missing some basic point here? I am using MonoTouch 1.4.4 The following matches like you Ignoring the accent: var language = "español"; MonoTouch.Foun...

c++ - utf-8 to/from utf-16 problem -

I am based on an answer on these two conversion functions and stack overflow, but changing back and forth does not work : std :: wstring MultiByteToWideString (const char * szSrc) {unsigned int iSizeOfStr = MultiByteToWideChar (CP_ACP, 0, szSrc, -1, NULL, 0); Wchar_t * wszTgt = new wchar_t [iSizeOfStr]; If (! WszTgt) thrust (0); Multibytovider (CP_ACCP, 0, SSRC, -1, WSJTTGT, ISIEFFST); Std :: wstring wstr (wszTgt); Delete (wszTgt); Return (wstr); } Std :: string WideStringToMultiByte (const wchar_t * wszSrc) {int iSizeOfStr = WideCharToMultiByte (CP_ACP, 0, wszSrc, -1, zero, 0, zero, zero); Four * szTgt = new four [iSizeOfStr]; If (! SzTgt) Returns (NULL); Wide-Chartamultibout (CP_ACP, 0, VSSSCR, -1, SGTGT, ISIEF, Null, Faucet); Std :: string str (szTgt); Delete (szTgt); Return (STR); } [...] // は て な ブ utf-16 wchar_t wTestUTF16 [] = L "\ u306f \ u3066 \ u306a \ u30d6 \ u306f \ u306f"; // shows the text correctly: messagebox (zero, wTestUTF16, L "message", MB...