Posts

Showing posts from September, 2010

c++ - How can I use templates to determine the appropriate argument passing method? -

As I understand it, when someone sends an object to a function that is larger than a register, then it It is better to pass (context) context, eg: void foo (const std :: string and bar) {...} It avoids potentially demonic rationality. However, when passing in a way that fits in a register, passing it as a const (context) is the most redundant, and at the slowest speed: void foo (const int & bar) {...} My problem is, I want to know when I am using the best of both worlds Get a template class that needs to be passed around any type: template & lt; Typename T & gt; Square Fu {Public: // Good for a complex type, bad for small types of zero times (CONST T & BAD); // Good for small types, but the complex type of waste will copy void bar2 (T-Baaz); }; Is there a template decision method that allows me to choose the right type? Something like that will let me, zero times (const_nocopy :: type baz); Will choose a better method on that type of basis...

apache - mod_rewrite index.php?p=$1 -

I am trying to rewrite index.php / page / I do not have to work on it can do! This is a work of: Rewrite code% {REQUEST_FILENAME} on rewriting! -f rewrite code% {REQUEST_FILENAME}! -d RecruitArrowout * Index.php? P = $ 1 [PT, L] Please help! back-reference $ 1 your RewriteRule Do not correspond to a group of left hand (groups defined by using parentheses) Try one of the following: RewriteRule * Index.php? P = $ 0 # - or - RewriteRule ^ (. *) $ Index.php? P = $ 1

jquery - Cloning JavaScript Objects. Again :( -

I know that this topic is really annoying to read again before the code digging can be a solution That I did not get the prototype and the object in javascript. . But at this point I think that, I do have the problem: Javascript class (created with prototype), how to clone so that "clone" class When the extension remains untouched and executed later? function clone (obz) {if (obj == faucet} type ob (obje)! = 'Object') change obe; Var temp = new obj.constructor (); For (var key in obj) temp [key] = clon (obj [key]); Return temporary; } Var FOO = function () {var myBAR = clone (bar); MyBAR.prototype = jQuery.extend (true, myBAR.prototype, this); // Double cloning twice and extension with this console.log ("FOO:", this.name); New mieber (); }; FOO.prototype = {name: "FOO"}; Var BAR = function () {console.log ("BAR:", this.name); }; BAR.prototype = {name: "bar"}; New FOO (); // imports FOO: FOO and bar: FOO new bar (); /...

PHP, postfix, sendmail, thunderbird for local dev only -

Hey, I'm trying to work on the php's mail function in my local Dev box in a way where all the mails have been sent using. Mail (regardless of recipient) will remain local and will appear in a Thunderbird account (pop / ipad / etc). I have to send the phm set to use the mail and install the postfix me. But I'm on any damage where to go next. Any hint? Register a user in the postfix, such as testers @ localhost Make sure that the postfix always sends all the emails to testuser @ localhost Make sure that the postfix always deletes all messages that were forwarded Make sure that your SMTP server accepts mail for invalid local address Uncheck 'Do not allow SMTP Relaying of non-local mail' Set up a pop-inbox in Thunderbird for Testuser @ localhost [edit] ] Just for the record, point 4 will ensure that whatever address you can use, when you are testing the system where email is unique (which is very common), then you will not be out of a valid email ...

javascript - PHP Secure Login - Client-side options? -

Right now I'm confused for the authentication I use with Codeigniter to get advice from the user on libraries I am here. I have detected dx_auth and simpleloginsecure (I think I will use it later due to my safe hashing and small footprint). But, what about the hashing of the password on the client side? I have not seen any mention of this in the documentation of libraries. How secure is these libraries, even if there is no need to have some client-side encryption (JS) so that passwords can never be posted in plain text? Or am I missing something and none of these libraries cover it ... thanks Update: However, I was under the assumption that it was PHP The codinator plugin) were in exchange for the SSL (were I completely wrong here)? If I am wrong, then is there a safe way to complete it without SSL? (Previously I used the JavaScript MD5 hash function to encrypt the password before posting it ... but I was expecting more securely). Update 2 is OK - so it seems that I s...

NSLog outputs to console when running on iphone simulator, but not when running on device -

Has anyone heard of someone before? It's making me crazy. It is only in the main app which I am working on. Other apps show NSLog in the Do console when running on the device. I have to reinstall the SDK, reboot the computer, clean up, delete the build folder, try to reboot the phone, one million things I know that the NSOg code is run because the exact project In addition to the SIM, in addition, the application around NSLG code that loads the initial view in the application of AdyLeget does not appear when running on the Destination Launching Device Happens. Runs the right app on the device, but I do not get the Nslog output in the console. If someone can help, it will be greatly appreciated! - Steve Whether you are viewing in the console application, or through the Xcode Organizer in the XCode Console Are available? Used by the pre-simulator, the latter is used for the devices.

decorator - Struts2 Sitemesh not working in WAS 6 server -

I have a string 2-spring application that works fine in JT server, but when I make it 6 decorator (sitemesh )) Not applicable The server log does not show any errors. Is this a known issue? My web XML looks like this & lt; Filter & gt; & Lt; Filter-name & gt; Action 2-cleaning & lt; / Filter-name & gt; & Lt; Filter range & gt; Org.apache.struts2.dispatcher.ActionContextCleanUp & lt; / Filter range & gt; & Lt; / Filter & gt; & Lt; Filter & gt; & Lt; Filter-name & gt; Sitemesh & lt; / Filter-name & gt; & Lt; Filter range & gt; Com.opensymphony.module.sitemesh.filter.PageFilter & lt; / Filter range & gt; & Lt; / Filter & gt; & Lt; Filter & gt; & Lt; Filter-name & gt; Action 2 & lt; / Filter-name & gt; & Lt; Filter range & gt; Org.apache.struts2.dispatcher.FilterDispatcher & lt; / Filter range & gt; & Lt; / Filter & gt; & Lt; Filter-mapp...

c - How to resolve "LINK : fatal error LNK1561: entry point must be defined"? -

People / Gauls: How can I resolve the following linking error: "link: fatal error LNK1561: entry point should be defined" . What I was trying to do, is just recompiling my SQL Storage Engine instance with Visual Studio 2008. Not familiar 'Example of MySQL Storage Engine' does not know whether it is a library or .exe etc. is. However, the linker is usually able to estimate the correct entry point based on the combination of your settings: Configuration Properties -> Linker -> System -> Subsystem, and Configuration Properties -> General -> Configuration Type View

layout - Should I let visitors to my site change the width of pages from fixed to a fluid? -

I am considering implementing a feature that gives visitors 800 px (for example) on my platform The width will change to 100%, and vice versa ... is this a good practice? You should consider that there are very different screen sizes out there so if you have a website If the width changes to 100%, then it can change it for example by 1600px which will double your initial size. If floating elements are created on your site, then there may be a change in size, this can not be a problem. Here's a good overview of what it means to have a liquid layout:

Can I define custom "surround with" templates in Visual Studio 2008? -

Can I define a "custom template" template in Visual Studio 2008? Here you can go, this {} / P> An example is to set everything selected inside, codesnipet manager. & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; CodeSnippets xmlns = "http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet" & gt; & Lt; CodeEncip format = "1.0.0" & gt; & Lt; Header & gt; & Lt; Title & gt; {} & Lt; / Title & gt; & Lt; Shortcut & gt; {} & Lt; / Shortcuts & gt; & Lt; Details & gt; {} & Lt; for code snippet / Description & gt; & Lt; Author & gt; Sergio & lt; / Author & gt; & Lt; SnippetTypes & gt; & Lt; SnippetType & gt; Expansion & lt; / SnippetType & gt; & Lt; SnippetType & gt; SurroundsWith & lt; / SnippetType & gt; & Lt; / SnippetTypes & gt; & Lt; / Header & gt; & Lt;...

.net - Is ViewState relevant in ASP.NET MVC? -

I am learning ASP.NET MVC and many concepts like "ASP.NET" such as authentication, authorization, session status still This is applicable. But whatever I have understood, I do not think that ViewStat is still relevant in an ASP.NET application. But this is (Property of System.Web.Mvc.ViewPage)! Is it for compatibility reasons or does it have some purpose / uses? Yes, that's right. ViewStat is not relevant The differences between page models and MVC can be found here:

repository - Distributed Revision Control, Wiki, and Bug-Tracking all in one -

I know but have any options? Some small and easy install / configure. I know that there are a lot of git-based wikis as and. One simple will bring many other people, I'm sure. I also know of some git-based bug trackers, such as basically you can put your ticket in a separate branch of GIT repository. But I do not know anything other than fossil that actually tries to do it in a joint device. I'm curious what your experience has been fossilized. This is one of those things which I find interesting but in reality it is not in the condition of using it so far.

c++ - where to put break in switch/case statement with blocks -

When I use the braces in the code in the code case in C ++ to move the variable If I do inside or out of the block the matter is between FOO: // 'break' {int i; to work(); break; } Case bar: // Exit 'break' {int i; to work(); } break; Thanks. It's a matter of style. To make it more readable, just put break outside the closing brace.

website - How do I redirect a multi language site to a default language page? -

मेरे पास यह है: - अंग्रेज़ी संस्करण - पुर्तगाली संस्करण मुझे क्या चाहिए: को पोर्टुगेट पृष्ठ पर डिफ़ॉल्ट रूप से लेना । > मैं नेटवर्क्स पर अंग्रेज़ी पृष्ठ को EN / निर्देशिका में रखने पर भी सोच रहा था। एसईओ के लिए यह बेहतर है? मुझे यकीन नहीं है कि मैं समस्या को समझता हूं, लेकिन आप एक इंडेक्स बना सकते हैं अपने रूट में .php और उपयोगकर्ता को पीटी / इंडेक्स.एफ़पी हैडर ("स्थान: ./PT/index .php "); बाद में आप ब्राउज़र की भाषा को सत्यापित करने के लिए if / else जांच का निर्माण कर सकते हैं।

Does Java compiler handle inline Strings efficiently? -

1। स्थिर अंतिम स्ट्रिंग memFriendly = "कुशलतापूर्वक संग्रहित स्ट्रिंग"; Println (memFriendly); 2। System.out.println ("कुशलतापूर्वक स्ट्रिंग संग्रहीत"); क्या जावा कंपाइलर इन दोनों (1 और 2) को उसी तरीके से इलाज करेगा? एफवाईआई: कुशलता से मैं रनटाइम मेमोरी उपयोग के साथ ही कोड निष्पादन समय। जैसे 1 मामले में स्केक पर अधिक समय लग सकता है जो चर के नाम से मेल खाता है? सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {System.out.println ("हैलो वर्ल्ड!"); स्ट्रिंग होला = "होला, मुंडो!"; Println (hola); } इस कोड के लिए disassembly के रूप में जोवप दिखाता है: 0: getstatic # 16; // फ़ील्ड जावा / लैंग / सिस्टम। आउट: लाजावा / io / प्रिंटस्ट्रीम; 3: एलडीसी # 22; // स्ट्रिंग हैलो दुनिया! 5: इनवॉवर्ज्यूलल # 24; // मेथड जावा / io / PrintStream.println: (Ljava / lang / String;) वी 8: एलडीसी # 30; // स्ट्रिंग होल, दुनिया! 10: खगोल 11: गस्टेटिक # 16; // फ़ील्ड जावा / लैंग / सिस्टम। आउट: लाजावा / io / प्रिंटस्ट्रीम; 14: अलॉडियस 15: इनवॉवर्ज...

.net - Mixture of types in generic list -

I am trying to do the following: list & lt; IRepository & lt; IBusinessObject, ICriteria & gt; & Gt; Repositories {receive; } and call it IRAPSorporation & lt; ICustomer, ICustomerCriteria & gt; CR = new customer repository (); List.Add (CustomerRepository); Where ICustomer and ICustomerCriteria descend from IBusinessObject and ICriteria, respectively. However, the compiler does not like it. Hmmm, I know I'm pushing it a bit, but I thought it would work? Anyone know why? Thanks Duncan This is a problem: This will clarify the problem: list & lt; String & gt; Wire = ...; & Lt; Object & gt; Object = strings; // Objects.Add (42); // 42 is an object - should work // But we will add an integer to the list of strings !! In .NET FX 4, C # to allow a specific type of these and outside normal behavior to correct behavior Will support.

c# - What is the most elegant way to implement GetTextAfterMarker() -

I have one more old work from my C # 1 day, what would be one more great way to write this: // Method: Text goes into a string in front of a marker, if the marker is not there, then return the empty string / example: GetTextAfterMarker ("documents / jan / letter043.doc" GiftTextAfterMarker ("letter043.doc", "/") / / rank: 8 public static string GetTextAfterMarker (string line, string marker) It is {string r = ""; Int pos = line.IndexOf (marker); If (pos! = -1) {r = line.Substring (pos + (marker.Length), line.Length-pos- (marker.Length)); } Other {r = ""; } Return R; } I've got some strange names, given that the text should be shown First marker but it works the same, I think (I have taken the liberty to change the name): public stable string GetTextBeforeMarker (string line, String marker) {if (line == empty) {fix minimum to new logic ("line"); } If (marker == faucet) {new logic: NullException ("marker...

Unload dynamic class in PHP -

I have loaded the plugins in the following ways: function process plugin ($ plgFile , $ Db) {require_once ($ plgFile); $ Plgin = new PlginImpl (); $ Plgin- & gt; SetDb ($ Database); $ Ret = $ plgin- & gt; process (); Return $ ret; } Each plugin defines a class named PlginImpl , which works fine. But it is possible to call more plug-in calls specified within the return value of process () . Please note that each plugin is: A class, that is: class implements the PlginImpl plugin PluginInterface plugin defines PluginInterface while providing some useful functions i.e. process () . I think the name of all the plugins is PlinyImpleplut, hence the cause of the problem, so my question is: One way to unload a class ( PlginImpl ) it is need_once ? Or should I follow a completely different approach? Edit I tried without following the following things: Unset $ Plgin After process () calling __ destruction () - it does not work within proce...

hibernate - how to define if domain has more than one unique field in grails? -

My domain has more than one unique field like the following square shoes {string of Name; Brand brand; Color color; Supplier Supplier; Integer shape; BigDec price; } The name, brand, color and supplier should be exclusive ... so if the same name is a product with a brand color and supplier then it will return as a false / false confirmation. Is it possible to define in grille or should I prepare the criteria before saving the form? :) Thank you! static constraints = {name unique: ['brand' , 'Color', 'Supplier']}

dojo grid area get unreadable -

I have a dojo app that Dojo grid of broad uses, some app to use after all the grid at Gray it takes ( a has for the potential causes of an idea? Do you include all the necessary CSS are? grid uses some of which are not part of the code- tundra. @import "/ js / dojox / grid / resources / grid .css "; @import" / js / dojox / grid / resources / tundraGrid.css "; @import" /js/dojo/resources/dojo.css "; @import" /js/dijit/themes/tundra/tundra.css "; If you have all this, then the next thing is to check that the grid is a visual area is closed. I have a ton of trouble in the part where the grid display: hidden div was started in. hope that this helps if not, then let me know.

How to increase the number of columns using R in Linux -

It may look vulnerable, but it affects my productivity. I'm using R in terminal mode on linux. Unlike Windows IDE, Linux has limited the number of columns to a limit of 80, thus monitoring data sets is difficult. Is there a way to determine the maximum number of columns? Here is a function that my ~ / .profile file: wide screen & lt; - Function (how wide = Sys.getenv ("COLUMNS")) {options (width = as.integer (howWide)}} howWide without argument Calling the function sets the column for the width of your terminal You can optionally pass in the argument to determine the width of the arbitrary number of your choice. Almost like the suggestion of passion, but less magic: -)

operating system - What is the Best Windows Development OS -

I am creating a DEV image and currently using Windows XP Pro x64 as my O / S Is there a reason to use a server o / s as a developer operating system or is it still the best option for XP? XP only allows you to host a web site in IIS. Very annoying. I recommend Windows Server 2003, 2008 or Windows 7. It is good to use a server version as close to your live environment. It is good to use 2008 / Win7 / Vista as they have IIS 7. It's a good idea to use Win7 better than others. The workstation operating system (XP, Vista, Win 7) has hard-coded limitations on thread / connection simultaneously, which means that you can not properly load the test locally. This is a low issue on the IIS7 box because they request queue instead of failing them. 64 bit OS is spoken a little - eg. I can not edit my host file with Notepad because it is stored in 32 bit directory and notepad is 64 bit. I had to find google to fix this bug and find Other problems can arise if you go 64 bits, but in...

asp.net - Disable Google Toolbar Autofill -

Text after " Google Toolbar's AutoFill feature has been made of its web development existence for the past several years. I'm always trying to make a timer control to check the changes because developers have failed to change the events of the change in control are buried in the back and has become further complicated when control nested repeaters, and Then there is another problem trying to attach to an UpdatePanel. Has anyone been able to successfully stop the Google Toolbar from completing the form fields without changing the name of the field to some constellation? (Note: This does not work for a 'status' dropdown, so it goes to check the field value as well) As Google's employee in smart form For the sake of being, it was a folly by stupidity. inspection. Update: For those who are looking for a solution here, what have I got to work till now, you have ASP.net, server control The "timer" is to be used and this control is set as a trigg...

How to get a Number key Pad with a point in iPhone -

नमस्ते मैं एक पाठ बॉक्स के लिए निम्न कोड का उपयोग कर रहा हूं UITextField * txt_field = [ [UITextField alloc] initWithFrame: फ्रेम]; [Txt_field setKeyboardType: UIKeyboardTypeNumberPad]; अब जब मैं टेक्स्ट फ़ील्ड पर क्लिक करता हूँ, तो एक नंबर पैड ऊपर आता है, जिसमें दशमलव बिंदु विकल्प नहीं है I मुझे एक पाठ फ़ील्ड चाहिए जो सिर्फ संख्या पैड के साथ होता है, जहां उपयोगकर्ता दशमलव बिंदु में भी संख्या दर्ज कर सकता है। मुझे पता है कि मैं अन्य पैड का उपयोग कर सकता हूं, लेकिन मैं उपयोगकर्ता को नंबर और एक बिंदु के अलावा अन्य किसी भी अन्य चरित्र की चाबियाँ का उपयोग करने की अनुमति नहीं देना चाहता। क्या यह संभव है। tnx इसमें अंतर्निहित कीबोर्ड लेआउट हैं या आपको अपना रोल करना होगा।

Does WPF's GridView have vertical borders? -

Is there a way to set a vertical border on WPF GridView? Some good horizontal limitations Is there a good way to add vertical borders to the gridview that is inside this list view? style x: key = "ListViewItemBase" TargetType = "{x: Type ListViewItem}" & gt; & Lt; Setter property = "borderline" value = "1" /> & Lt; Setter Property = "Borderbrush" Value = "#Baby" /> & Lt; / Style & gt; Thanks in advance Try it ... & lt; ScrollContentPresenter x: Name = "PART_ScrollContentPresenter" SnapsToDevicePixels = "{TemplateBinding SnapsToDevicePixels}" ContentTemplate = "{TemplateBinding ContentTemplate}" KeyboardNavigation.DirectionalNavigation = "local" CanContentScroll = "{TemplateBinding CanContentScroll}" & gt; & Lt; ScrollContentPresenter.Content & gt; & Lt; Grid & gt; & Lt ;! - Container of vertical and horiz...

objective c - Strange graphics glitch when using flip animation -

While creating a flip animation I am getting a strange error, these three bars are shown, almost like strips like this Not being dragged too. I got a screenshot to show what I'm talking about. These rows are always in one place, and are visible on both sides. Here is the code I am using, I have used it without problems first, so I'm not sure what's going on. - (zero) switchviews {BOOL isChangingToMapView = _mapViewController.view.superview == Zero; CGContextRef Reference = UIGraphicsGetCurrentContext (); [UIView Start Permissions: Zero References: Reference]; [UIView Set Animation Duration: 1]; [UIView SetAnimation Transition: (ChangingTampPopUview? UIViewAnimationTransitionFlipFromLeft: UIViewAnimationTransitionFlipFromRight) See: self.view cache: yes]; If (ChangingTamviewView) ([_mapViewController viewWillAppear: Yes]; [_listViewControllerViewSpecial: Yes]; [_listViewController.view RemovalPreviewview]; [Insert self.viewSUEview: Index on _mapViewController.vi...

website - Shopping cart without breaking design -

I have a fully-formed website, but now the need for a shopping cart is felt. Can a shopping cart recommend so that you can add elements to your pages, instead of designing a template instead?

c# - Is an atomic operation enough -

वर्ग रोको {निजी बूल स्टॉप; शून्य लूप () {while (! Stop) {// work}} शून्य रोक () {stop = true; }} असल में, यदि लूप पद्धति एक थ्रेड में चल रही है और स्टॉप को दूसरे से कहा जाता है तो क्या ऑपरेशन ठीक से बंद हो जाएगा? मैं समझता हूं कि बूल पढ़ना / लिखना परमाणु है। लेकिन, क्या यह पर्याप्त है? अगर धागा पाश तुरंत बंद नहीं हो जाता है तो परेशानी होती है। क्या मुझे अस्थिर रोकना चाहिए? हां, आपको निश्चित रूप से stop को चिह्नित करना चाहिए अस्थिरता। परमाणु पर्याप्त नहीं है - यह गारंटी नहीं देता है कि एक धागा कभी किसी दूसरे द्वारा किए गए परिवर्तनों को "देखना" होगा। जबकि अस्थिर वर्तमान में कुछ सर्जरी के दौर से गुजर रहा है, आप मोटे तौर पर एक वाष्पशील चर के लिए एक लिखने के बारे में सोच सकते हैं "सुनिश्चित करें कि दूसरों को यह तुरंत देख सकते हैं!" और अस्थिर वैरिएबल से पढ़ा जाता है, जैसा कि "मैं नवीनतम मान देखना चाहता हूं!" बिना stop अस्थिर बनाने के बिना, यह लूप हमेशा के लिए जा सकता है, भले ही रोकें () एक अलग थ्रेड में कहा जाता है असल में जेआईटी काफ...

foreign key relationship - nhibernate parent/child one-to-one mapping -

मेरे पास दो वर्ग हैं: सार्वजनिक वर्ग कोड {सार्वजनिक वर्चुअल GUID कोड आईडी {get; सेट; } सार्वजनिक वर्चुअल स्ट्रिंग codeValue {get; सेट; } सार्वजनिक वर्चुअल Guid EntryId {get; सेट; }} सार्वजनिक वर्ग की प्रविष्टि {सार्वजनिक वर्चुअल गाइड एंट्री आईडी {get; सेट; } सार्वजनिक आभासी स्ट्रिंग प्रथम नाम {प्राप्त; सेट; } सार्वजनिक आभासी स्ट्रिंग LastName {get; सेट; } सार्वजनिक आभासी स्ट्रिंग पता {get; सेट; } सार्वजनिक वर्चुअल स्ट्रिंग Address2 {get; सेट; } सार्वजनिक आभासी स्ट्रिंग शहर {get; सेट; } सार्वजनिक आभासी स्ट्रिंग राज्य {get; सेट; } सार्वजनिक वर्चुअल स्ट्रिंग ज़िप {get; सेट; } सार्वजनिक वर्चुअल स्ट्रिंग ईमेल {get; सेट; } सार्वजनिक वर्चुअल स्ट्रिंग फोन {get; सेट; } सार्वजनिक आभासी स्ट्रिंग IpAddress {get; सेट; } सार्वजनिक आभासी दिनांक समय जन्मदिन {प्राप्त; सेट; } सार्वजनिक वर्चुअल दिनांक समय बनाया (प्राप्त करें; सेट; } सार्वजनिक वर्चुअल बूल ऑप्ट इन {get; सेट; } सार्वजनिक वर्चुअल कोड कोड {प्राप्त करें; सेट; }} मैं एंट्री ऑब्जेक्ट के कोड बच्चे की संपत्ति को स्वचालित रूप से लोड / सहे...

actionscript 3 - Wanted - better Flash Professional tools -

Can recommend a plugin / extension for a Flash Professional which can improve the debugging feature for Flash Professionals Currently, I am using FlashDevelop to help in coding tasks, but breakpoints etc. Not yet working well with FLA-based projects. Thank you OK, there is a possibility that you can use FlashDec Develop your own with FDT or Flexbilder (say FlashBuilder soon) and your output is SWC. Flash CS4 can now be compiled in SWC - it is in the settings published under Action Script Settings. We create our flash projects in this way or in the reverse where we make assets in Flash Professional, using an SWC of Output Graphics and using SWC in a better development environment (we prefer FDT ).

php - Creating hashes for passwords -

I am creating a custom CMS and have created a login system and wandering how to compare such a password Just by using the MD5 PHP function like this: How do I do this here The $ key is unique to each user, which will have a value in the database. $ Salt and dollar black pepper randomly generates the string. $ Password is the password of course. Added on 07/24/09 Thanks for all your responses Do anyone have an example that they have a hash to create a password to store in a database How do the script? similarly: Make sure you read it: And this:

asp.net mvc - MVCContrib grid and posting back with model binder -

Comes to a strongly typed view of the content model of my MVCContrib grid. When a post is created, the contents of the grid are not in the model object, when it comes back to the controller. I can see that this is because the grid presents cells with text as just a table. Is there anything I can do so that when the post is done, will the data data sent to the grid come back in the post? You can use TempData to continue this information server side. The information in TempData continues for a request. I really do not like this option. Can not you replace your model with DB? If the user information is not changing, why do you need to post back all unchanged information? Where is it already from

Rule of thumb for naming wrapper classes -

I feel myself creating a significant number of shelter classes, purely because I Ul> Classrooms that do not lend themselves well to RhinoMocks isolation models (like DirectoryInfo or WindowsIdentity ) Native Win API methods (I usually assemble all the methods in which I need a class and hide the original call as a class method Then I would call myself 'W' (to indicate that this is a cover) and so I DirectoryInfoW ( DirectoryInfoWrapper NativeMethods.DuplicateTokenW . What will be the good rule of thumb after the naming of thumb squares? Naming conventions Whatever work you do for the team you are working with. As long as everyone is right with a particular conference, then it is fine. I prefer more verbose version, however, that is, DirectoryInfoWrapper is understandable to anyone who is not familiar with the code. But this is just me.

c - Bits representation of negative numbers -

This is a doubt about the representation of bits of signed integer, for example, when you want to represent -1 , Then it is equal to the complement of 2 (+1). So -1 is shown as 0xFFFFFFF Now when I change my number to 31 and print the result it is coming back as -1. signed int a = -1; Printf (("number is% d", (a> 31)); // it is print-1; would someone tell me how bits are represented for negative numbers? Thank you. When the top bit is zero, then the number is positive. , The number is negative. Negative numbers have been moved to move "1" to keep the number negative as the topmost part This is the reason that you are getting this answer. For more about two supplements, see. @brob show that instead of some implementation 1 1. [Verified Wikipedia]. This dependence in Java is an arithmetic change. But the output given by the questioner shows that its compiler is doing arithmetic changes .

java socket send & receive byte array -

In the server, I sent a byte array to the customer via Java socket Byte [] Message = ...; DataOutputStream dout = new dataoptputstream (client.getOutputStream ()); Dout.write (message); How can I get this byte array from the client? Anyone gives me some examples to do this code in advance try it, it's for me doing work. Br> Sender: byte [] message = ... socket socket = ... data output speed dOut = new data optup stream (socket. Acoutputstream) ); DOut.writeInt (message.length); // write length of message dOut.write (message); // Message Type Receiver: socket socket = ... DataInputStream dIn = New DataInputStream (socket .getInputStream ()); Int length = dIn.readInt (); // Read the length of incoming message if (length> gt; 0) {byte [] message = new byte [length]; DIn.readFully (message, 0, message.length); // read message}

fortran - Where can I get the files to install f2c on redhat linux? -

I am looking for an RPM or simple installation instructions so that f2c is used to work on my redhat linux os. I am new to Linux and it is difficult to find something like this on Google. (target is to use F2c to convert a simple Fortran 77 file, then compile it) Do anyone have any suggestions? Receiving source with Rsync (recommended): $ rsync -vz netlib.org "post-text" itemprop = "text "> :: Obtain source via FTP: $ mkdir -p f2c / src $ cd f2c / src $ ftp ftp .netlib.org Ftp & gt; Cd fcc ftp & gt; Quick FTP & gt; Mget * To create sources, do the f2c / src directory: $ make -f makefile.u To install binary, copy it to a directory in your $ PATH: $ mkdir -p / usr / local / bin / usr / local / man / man1 $ cp f2c / You will also need this to compile FORTRAN programs: / P> $ mkdir libf2c $ cd libf2c $ unzip ../libf2c.zip $ make -f makefile.u $ make -f makefile.u install LIBDIR = / Usr / local / lib libf2c The c...

iphone - What is "Attempt to lookup host entry for bad IP address" error? -

Check this error and please help me. 2009-07-24 15:58: 34.20 9 lbs [2636] Host 'staging.common.virtualearth.net' was not found 'gethostbyname ()' - Maybe the hostname is incorrect or Networking is not installed on your machine 2009-07-24 15: 58: 34.209 lbs [2636] Try looking at the host entry for bad IP address (staging.common.virtualearth.net) Note: You have to enable disk statistics 'Diskperf -y' should run objc code to kill a webservice on gnu for windows I am running Why is this error? The first line states that it can not find the IP address from the DNS server. The second has some kind of fallback with an incredible secret error. It seems that it is trying to reverse the DNS as hostname using an IP address (hence the bad IP address) or an ARP resolution as the IP address from hostname. Actually, that host fixes DNS and both will be resolved.

openid - Explaining security to non-technical managers -

I keep maintaining the intranet website for my company that they want to expose the big, bad hair outside the world . Right now, it does not have any authentication or authorization. My idea to manage user accounts is to validate user accounts using existing technologies and build an authorization model on it. The current technique will be CardSpace and OpenID, which will save us from maintaining a list of usernames and passwords, which will make the site less interesting for hackers. The data on the site is not sensitive either. Actually, we only export the same data as one of our desktop products and anybody can view this information if they know where it is, -Except all users except data are preventing them from modifying data, a superuver destroys all data, in which we have to restore a backup. In worst case scenario, we lose data entry of one day which will translate for most hundred modifications. (Actually 98 was actually the largest number of modifications in a day.) Ever...

sharepoint - Custom list definition + custom content type = showing only one form field? -

is trying to use the custom fields, content types and features to deploy the list. So far, I have a custom type that refers to custom and Biltine fields. Content type inherited object (0x01). Now, I create a custom list definition that refers to the content type and fields (Biltin and custom ones); I clearly see the ShowInDisplayForm, ShowInEditForm, ShowInEditForm values But when I design the feature and make a list based on the definition, I get a single title field in all forms! However, if I add the field to the list from the UI, then it appears in the form! In addition, if I create a custom list from the UI and add content types, then these fields are shown in the form! What's going on with this? Anyway, I use the VSSESS tool for Visual Studio, before it prepares a lot for content correctly. Some code: & lt; Content Type & gt; & Lt; ContentTypeRef id = "0x01003420C661289843dbAB9E41F43C23BFD0" /> & Lt; / CONTENTTYPES & gt; ...

delphi - Vista, inifiles, and run at startup oddities... what the heck -

I'm having something with a small app that I have created, I do not know what the problem is. The app is just a small text panel clock that is located above the taskbar on the second monitor. Settings are saved in the proper Apadata folder through the interval, and the specs are saved properly, i.e. x and y location, font, font style, etc. I want to run it automatically when Windows boots up. I just pulled a shortcut to start the program. The startup folder was booted in the morning, for a moment, it loaded in the right place, then quickly withdrew from 0 to 0 on the X-Y plane. I saw Enfeil, and believe that ... this is the top = 1133 Left = 1920, as it is supposed to be, even then the windows start at the top = 0 left = 0. What the heck? ... Check that you also have 'Status = Po Design'. If you do not, then he will use that setting for priority if this is correct, then ask a certain offset in your X and Y properties to see if it is where it is the default, ide...

design patterns - Database Abstraction - what are the options? -

How can I restrict my database to my application so that it is unaware of the database type? I have to design a .NET 3.5 WPF application, which is to support SQL Server or Visual FoxPro as a data repository. My design goals are: Type the data invisible data repository switch between SQL and FoxPro while writing code in the Data Access layer Do not make as quick and painless as possible to do Allow the use of both ANSI SQL and stored procedures DL To learn for other developers joining the project At least the state Ahia It is using will have a WPF application, perhaps Sisela. I have thought of using any type of ORM but there is no experience with such technology. Many ORM database types are agnostic, although FoxPro requirement can restrict your choises or you Needs to be typed. Own provider or adapter If you want your app to be able to work with multiple database types, then through the configuration, you should be careful that your schema is consistent in every d...

c# - How to "Unset" Event -

If I have a combobox click event set on the Designer.cs page during programming and then at some point in the program, Depending on some condition, now I want to click on the event to set boxbox, how do I "unset" it? I've tried the combo box name. Click + = null and I have tried to set it to another dummy function which does nothing ... neither works. Set: comboBox.Click + = EventHandler; Unset: comboBox.Click - = EventHandler;

security - Remove Server Response Header IIS7 -

Is there a way to remove "server" feedback headers from IIS7? Some articles are being shown that we can achieve the same thing using the HTTPS module. It would be helpful if we do not have the rights to the server. Besides, I do not want to type the ISAPI filter. I have admin rights on my server, so I do not want to do the above stuff. So, please help me do the same. Add it to your global.asax.cs: Secure void Application_PreSendRequestHeaders () {Response.Headers.Remove (" server "); Response.Headers.Remove ("X-ASPNET-version"); Response.Headers.Remove ("X-AspNetMvc-Edition"); }

asp.net - How to return all records for Gridview select command parameter -

Use asp.net Select the command in gridview, how can I select all records including blank for a specific area? I have a parameter that changes with the dropdown selection. I have a default list item which is set to% but this will not bring the records with spaces. I tried to do this: where ('@submit' like '%' And user_submit @ login or user_submit IS is tap) or (@ login not '%' and @ submit as user's name)), but or both are getting blank records in the edges of the statement. I also tried a case statement but did not understand how to select both% and 'null'. If I am wrong in the right way, then I think that you want to select based on criteria , But if there is also a value of zero in the field. Something like this should work for you Whatever '%' or anything which is empty with Table_1 Choose from

background process - Can an ASP.NET page do some of its processing after the page finishes loading? -

I have an asp.net page that is taking too long to load. A little test shows that server side logging is taking a fair share of time and (because the user never needs to see the logging result) I will delay it till the page is loaded. Want to Is there an easy way to do this? I have tried to put it in the Disposed event of the page but it is not visible in the fire Unload event but it will also soon fire It seems that I do not need to lay eggs on any thread, but I can do it if it is the same. I'm looking for not AJAX. I want to load a normal full page and after processing the page (as seen from the client side) do a bit more processing. This appears to be working: protected void Page_Unload (Object Sender, EventArgs E) {HttpContext.Current.Response.Flush (); HttpContext.Current.Response.Close (); Thread.Sleep (20000); // Process to sleep place here :) Debug. WrightLine ("Done!"); } You mentioned that the unload event has started to fire very soo...

mobile - Limitations on SMS messages sent using free email->SMS gateways -

In the United States, many cell (mobile) phone providers have an email gateway for SMS, which allows anyone to send an email that will be Send a text message For example, to send a text message to a user who has a Verizon phone, you can send an email to user_phone_number@vtext.com. But ... how reliable are these entrances, and at which rate can the message be sent? At some point, what is the provider block or throttle service? text "itemprop =" text " > Email-to-SMS gateways are generally reliable in some situations (read below). Whether you should use an email-to-SMS gateway or an actual third-party provider, depending on the application . If you need a lot of control over the formatting of the messages, collecting the answers, then go with a third-party provider. If you are sending a lot of messages from the same email address, then the messages will be backed up. For example, I sent a message to about 3,000 AT & T wireless recipients, and so...

Android - Is it possible to programatically disable certain functionality? -

Is the following actions possible using the latest version of the Android API? Temporarily unable to send text disable temporarily receiving text messages * Ideally, I block them and later queue them for delivery. Disable outgoing calls temporarily except for some phone numbers Temporarily incoming calls except some phone numbers Disable li> Can turn on the mode, which disables all the radio. In addition, whatever you want to do is not possible with a simple Android application.

inversion of control - How do I do this in Unity? -

The one example is an article on the use of Jimmy Bogart He uses Strccrmap but I'm using Unity And I'm not sure how to use the injection constructor. Below is the code from the paragraph and below is my bad attempt. Can anyone tell me how to do it properly? public class configuration registry: Registry {public configuration registry () (ForRequestedType & lt; Configuration & gt; () .CacheBy (InstanceScope.Singleton) .Default.Is.OfConcreteType & lt; Configuration & gt; () .CtorDependency & lt; IEnumerable & lt; IObjectMapper & gt; & gt; (). what is (expr = & gt; expr.Constructed By (MapperRegistry.AllMappers)); ForRequestedType & lt; IConfigurationProvider & gt ; () Kdifoltkais. Constrkt the (ctx = & gt; ctx.GetInstance & lt; configuration & gt; (the)); ForRequestedType & lt; IConfiguration & gt; () Kdifoltkais. Constrkt made ( Ctx = & g t; ctx.GetInstance & lt; Configuration & gt; ());}} My...

How to format dateTime in django template? -

उस: {{wpis.entry.lastChangeDate | तिथि: "डी डी मेरी "}} मुझे देता है (क्यों?): 2009-07-24 21: 45: 38.986156 और मुझे नहीं पता कि अंश भाग कैसे छोड़ना है ... मेरे मॉडल में मेरे पास है: जोड़ा गया = मॉडल.डेटाफ़ाइलफिल्ड (डिफ़ॉल्ट = datetime.now ) आप इसका उपयोग कर सकते हैं: addDate = Datetime.now ()। प्रतिस्थापन (माइक्रोजकंड = 0)

c# - Different algorithm for different inputs -

I am facing a situation. I want to know whether this is a design pattern or not. This is as follows: The user is presented on a web interface with a variety of algorithms for a process User selection is stored in database Now, the application should perform different computations depending on the selected algorithm. What is a good strategy to implement it? Right now we're doing - a reference DB table which is the same class name in the algorithm type and code (for example, the quick sort algorithm we store quicksort.) . In the code, get the algorithm type and use the reflection to instantify the appropriate algorithm type. ; In C # we System.Reflection.Assembly type = System.Reflection.Assembly.LoadFile (. System.Reflection.Assembly.GetExecutingAssembly () Location.ToString ()) using the same code below Foreach ( Type T type) if (t.Name == classname) createinstanceof (t) // classnames is a list of all class types that have been loaded in the DB from the refere...

php - Whats the proper way to check if mysql_query() returned any results? -

I tried what seemed like the most intuitive approach $ query = "SELECT * FROM member WHERE user name = '$ _CLEAN [username]' and password = '$ _CLEAN [password]'"; $ Result = mysql_query ($ query); If ($ result) {... but it is not working because mysql_query returns a real value, even if 0 rows are returned I basically want to execute only the arguments in that situation if I returned a line. Use: if (mysql_num_rows ($ result)) {// do stuff}

mod rewrite - XAMPP Mod_Rewrite & dynamic CSS -

I am running Apache with Mod_Rewite on my local computer (MAC) and all set in XAMPP's httpd.conf file Allow These are my rules, the snippet of the httpd.conf file - revive on rewind history ^ / setup / css / user-layout css / cssup / css / user-out.php surname / MS "/ user / web / wwwroot / ms" & lt; The directory "/ user / web / wwwroot / ms" & gt; Option Index Multivisous Of Orders Order Order, Deny, From All & lt; / Directory & gt; I have in my index.php file - & lt; Link rel = "stylesheet" type = "text / css" href = "setup / css / userout css? U = 1" /> and in my userlayout.php file - & lt ;? Php header ('content-type: text / css'); Echo "#test {background-color: # 000;}"; ? & Gt; Everything is but rules do nothing. I'm not sure I'm putting the rules in the right place and I understand that you can not do this in the httpd.conf file and in the .htac...

MySQL Select Statement DISTINCT for Multiple Columns -

I am currently trying to create a somewhat difficult MySQL selection statement. This is what I am trying to do: I have a table: data_table uniqueID stringID Subject 1 144 "My subject" 2 144 "My subject - New "3 144" My Subject - The Newest "4 211" Some Other Columns "Actually, what I would like to do / would be able to select / group by string id ( Picture string id is threaded) and it has not been duplicated. In addition, I would like to select the most recent string ID line, (which is unique in the example above 3). Therefore, if I ask the database, then this is the following (most recently UIIID on top): uniqueID stringID topic 4 211 "some other column" 3 144 "My Theme - Latest" // Notice This is the most recent and specific string ID line proper topic column I hope this makes sense. Thank you for you. Try the following This can not be the most efficient query, but it will work: , IDILIDIDID by Strin...

Is it feasible to develop a chat app using php sockets? -

I'm looking to develop a chat application using php sockets, I see a bridge between nodes I'm looking for not to include the database, because the amount of database interaction will eventually be an overhead. PLS suggestion. First remove the flash part in Google, and what will you have that you need.

code analysis - Extracting the Java method text -

I have created a tool that measures some reconciliation matrix on Java source files, but these metrics depend on your The list can determine the properties used by this method, I have created a parser to do this, which helps in removing the method code, but I have some problems, so I would ask that to parse the java file someone How to remove device and method code as text? Thank you, I suspect that whatever you want is what you Want to It is believed that when you had the source code, how would you decide the list of attributes that are accessed? Instead, you really need to run a bytecode, and look for the gatefield and setfield epodeodes. BECEL has a proper approach to doing this.

How to model Open/Closed statuses in a database? -

कल्पना कीजिए कि मेरे पास कॉलम ऑर्डरआईडी (पीके), कस्टमरआईडी, ग्राहक ऑर्डर एन के साथ एक ऑर्डर की मेज है। अब मुझे ऑर्डर बंद करने के एक कारण को निर्दिष्ट करने के लिए "बंद" ऑर्डर करने की संभावना जोड़नी होगी (उदाहरण के लिए "ग्राहक की पेशकश की गई कीमत बहुत अधिक है", "उपलब्ध नहीं", "ग्राहक ने आदेश बंद करने को कहा")। प्रश्न 1। डेटाबेस डिजाइन में इसे लागू करने का सबसे अच्छा और सही तरीका क्या होगा? मुझे लगता है कि सबसे अच्छा तरीका है बंद कॉलम बनाने के लिए शून्य हो सकता है (यदि आदेश खुले है) और यदि नल नहीं है (यानी यदि ऑर्डर बंद है) तो मूल्य एक अन्य तालिका ऑर्डर क्लासेज़ रेजिज़न को इंगित करता है प्रश्न 2। यदि पहले से ही मेरे पास है I) आदेश तालिका में बंद हुआ एक बूलीयन कॉलम, और अब मुझे बंद होने के कारणों को निर्दिष्ट करने की संभावना को कार्यान्वित करने की आवश्यकता है I मैं बहुत ज्यादा रिफैक्टर नहीं कर सकता क्योंकि सिस्टम पहले से बहुत छोटा नहीं है, इसलिए डेटाबेस स्कीम को रिफैक्टर करना कठिन है। ऐसे मामले में बंद करने के कारणों को निर्दिष्ट करने की...

Getting Form Input with Javascript or jQuery for Background Color Manipulation -

How can I get real-time forms and use them to change the background color of the elements? I have an input field which will accept six digits hex value: Thanks in advance - B It should: update the function () {Var len = $ ('# acct-bcolor'). Val (). Match (/ [0- 9AF] {1} / ig). Length; If (lane == 3 || lan == 6) $ ('body'). CSS ('background-color', '#' + $ ('# acct-b color'). Val ()); } UpdateColor (); Run once on page load $ ('# acct-bicoler') Bind ('Focus', function () {$ (this) .bind ('keyboard', update collar);}). Bind ('blur.bgcolor', function () {$ (this). Unbound ('keyp');});

language agnostic - How can standards guarantee a data structure uses contiguous memory? -

I was wondering how memory works, like language standards (such as the C ++ ISO / ANSI standard) You can give that any data structure (even an array too) will be narrowed. I do not even know how to write the data structure using casual memory, but can you give me a short example of how the designer can do it? For example, assuming C + + to std :: vector allocates all of its memory over the runtime, how will it know that the memory slot is not in use beyond the current allocated memory (and thus, free for use By vector)? Do the vectors look far ahead and expect that the user does not try and pushback many objects that it can no longer store it in any composite memory block? Or does the operating system roam in memory, it will save you from becoming a problem (how will it know how it will work)? Your question is about how to understand the concept of memory allocation from the view of the starting points. Try to explain to me what is going on in a very simple way. For example,...

If Statement Not Working as Expected in ASP Classic -

I have an if..seek statement whether the student is eligible for competition based on the price or not in the database But, my code is not working properly. My code is as follows: & lt;% if (rs_view.Fields.Item ("StudentStatus"). Value = "OK") then% & gt; & Lt; Strong & gt; & Lt; Font color = "# 3300FF" size = "- 1" face = "ariel, helvetica, without-serif" & gt; & Lt;% Response.Write ("You Are Eligible to Contest")% & gt; & Lt; / Font & gt; & Lt; / Strong> & Lt;% other% & gt; & Lt; Strong & gt; & Lt; Font color = "# FF 20000" size = "- 1" face = "ariel, helvicica, without-serif" & gt; & Lt;% Response.Write ("You are not eligible to go to the competition")% & gt; & Lt; / Font & gt; & Lt; / Strong> & Lt;% end if% & gt; Any ideas? This does not work correctly. Either the stud...

c++ - Connect to a wireless network programmatically -

I'm trying to write an app that automatically connects to my company's wireless network on Windows XP. I got the wireless LAN API but I need to install some hotfix on the machine, and you have machines with SP2 or higher (SP1), and I have to support any XP machine ) is required. I have tried to find some samples about wireless Zero configuration on MSDN, but with no luck, I have found that only samples are for WinCE, I think Microsoft It has stopped supporting it. Apart from this, I did not find any place to download Dell and Header files for working with WLWC. There should be a way to do this and work on any service pack because I have found Please note that any changes you make to implement these old XP machines will be similar to SP2, except that (1), you do not have the insight of the network stack that Microsoft has, (2) You do not have experience in Windows Development that Microsoft is together And (3) do not have a test Microsoft's resources (includin...

.net - How to release a managed resource which will not be garbage collected if the caller forget to use Dispose()? -

In my code, I have a class that creates a new thread. This new thread has a dispatcher, so thread will not end until I call Dispatcher.CurrentDispatcher.InvokeShutdown (); Threads can not be referenced outside of my class. So I was thinking: to ensure that my thread is over when my object garbage is collected? An answer is to use IDisposable, but if a person forgets to call the displacement, the thread will never stop, not a solution. Use one more reaction + Destination is to be settled, but I have heard that we should use only the destroyer for release unmanaged resources. I am at a dead end. What is the best solution? One option is to use only for the final debug build. Do not just stop this "well" thread: Log it in a very important way, it should help you to isolate places where you have forgotten to fix the object properly. However, this is not easy and it is undesirable to separate the debug and release code. Will your dispatcher usually receive ...

math - Is there a strongly typed programming language which allows you to define new operators? -

I am currently looking for a programming language to write a math class. I know that there are so many and there are lots of places around them, but since I am going to start studying mathematics in the next session, I thought that this is one of the things I have learned about the deep information Good way can be. Thank you for your reply. BTW: If you're wondering what I want to ask: "Is there a strong typing programming language that allows you to define new operators?" , Haskell makes it very easy: % ghci ghci & gt; let's do a * - * b = (a * a) - (b * b) ghci & gt; : Type (* - *) (* - *) :: (number) = & gt; A - & gt; A - & gt; A GSC & gt; 4 * - * 3 7 gci & gt; 1.2 * - * 0.9 0.6299999999999999 GCA & gt; (* - *) 5 3 16Gci & gt; : { Give to GCD A One & gt; B = GCD (A - B) B | B & gt; A = GCD A (B - A) | Otherwise = a :} ghci & gt; : Type GCD GCD :: (Ord A, Number A) = & gt; A - ...

javascript - Maintain scroller position on Div after page postback (ASP.NET) -

मेरे पास एक div है जैसे: & lt; div style = "overflow-y : स्क्रॉल; ऊंचाई: 260 पीएक्स "& gt; मेरे पास कुछ सौ रिकॉर्ड हैं और मुझे इसके नीचे एक प्रपत्र नियंत्रण को पॉप्यूलेट करने के लिए कोई आइटम चुनने की इजाजत देता है। समस्या यह है कि जब पृष्ठ पोस्ट-बैक हो, Scroller की स्थिति div के शीर्ष पर वापस जाती है कोई भी विचार? इस तरह से कुछ रखें: & lt; asp: HiddenField id =" hdnScrollPos "runat =" server "/ & gt; आपके एएसपीएक्स में फिर, कुछ जावास्क्रिप्ट की तरह: var hdnScroll = document.getElementById (& lt;% = hdnScrollPos.ClientID% & gt;); Var bigDiv = document.getElementById ('bigDiv'); BigDiv.onscroll = समारोह () {hdnScroll.value = bigDiv.scrollTop; } Window.onload = function () {bigDiv.scrollTop = hdnScroll.value; }

c# - Linq to XML Error -

मुझे XML क्वेरी में अपने लिनक्स के साथ एक समस्या है: var q = (से एफ (xmlLang.Element ("lang") तत्वों ("पृष्ठ") जहां (स्ट्रिंग) f.Attribute ("id") == "घर" चुनें f.Element (लैंगएलेमेंट)। वैल्यू.ToString ())। (1) .SingleOrDefault (); एक्सएमएल इस तरह दिखता है, & lt; lang & gt; & Lt; पृष्ठ आईडी = "होम" & gt; & LT; हैलो & gt;! नमस्ते & lt; / हैलो & gt; & Lt; / पृष्ठ & gt; ... & lt; / lang & gt; मुझे यह त्रुटि मिलती है: ऑब्जेक्ट संदर्भ किसी ऑब्जेक्ट के उदाहरण में सेट नहीं है। आपने LangElement को कहीं भी परिभाषित नहीं किया है स्पीपेट। पठनीयता के लिए, मैं f एक अधिक वर्णनात्मक नाम देता हूँ (जैसे, langpage या कुछ और)। । ले लो (1) .SingleOrDefault () अधिक संक्षेप में के रूप में रखा जाता है। FirstOrDefault () यह कोड काम करता है: var xmlLang = XDocument.Parse (@ "& lt; लंग & gt; & lt; पृष्ठ आईडी =" "घर" "& gt; नमस्ते &...

database - To get primary and foreign keys right in ERD -

I read my notes and now I am unsure about the keys. My Logical Diagram This table should correspond to the following physical ERD I have only one foreign key table question . I would like to know question-id and in the question table question-tag-xref , And question-id and answers can also be a answer foreign key in the table? Masi - Logical models usually do not contain data types (string, int, Etc.), but this indicates that the attribute (a column is formed in the physical model) is optional (capable of being empty or not). He said, yes - question-id and question- TAG column QUESTION-TAG-XREF will be foreign key in the table. Here is a physical view of QUESTION-TAG-XREF: Question-Tag-Xref Question-ID (with quiz PK, FK Relationships Table) Question-Tag-Code (PK, FK Relationships with Quiz-Tag Tables) To ensure that both columns are PK That you can not duplicate tags for a given question. You are right that QUESTION-ID ANSWERS will be a ...

Mathematica: Determine if all integers in a list are less than a number? -

Is there a way in mathematics to determine whether all integers in the list are less than a set number or not? For example, if I want to know that all the numbers in the list are less than 10: theList = {1, 2, 3, 10}; Magic Function [List, 10]; - & gt; thanks for your help for the list, which From the largest number in the list, you can check that this value is less than a certain number.