Posts

Showing posts from July, 2010

string - Printing floating point number in python -

How can I print the lines of the following code, but I can get a floating point number instead of a rounded int ? Print "Math Question:", 100 - 25 * 3% 4 Print 3 + 2 + 1 - 5 + 4% 2 - 1/4 + 6 with the division in / 2.x results in an integer if both operencies are integers or Then first put an orange in a float in a float, or __future__ from the import division .

c# - Serializing on Desktop, Deserializing in Silverlight -

I'm trying to create content through a small desktop app, and it should appear inside a silverlight application I am here. (I'm making a simple, simple C # object, and trying to keep it going smoothly.) Reference is a game of some kind, where I have a desktop tool that allows me to create and edit the content I want , And then Silverlight Bayreyers consume it. How can I serial some (desktop) in C # and can it be serialized in serial lights? There is a small library created for my sermonization; It uses Silverlight, and a simple BinaryFormatter for each desktop, it's OK; But across the platform, these two are clearly inconsistent. Is it possible to do this? I do not like to return the data to save the data manually as text and then parse it, and if possible I do not like to use an embedded database. I can have lists of lists and other complex data, and manually parsing it is very painful. If this is not possible, then what options do I have? Edit: Proto...

sql - Check if value in column for all rows is exactly value -

For example, I want to follow number 2 as the target This is a positive sign > ID Status 123 1 432 3 531 2 123 2 This negative signal should return: ID status 123 1 432 1 531 1 123 1 Code> thanks EXISTS in priority COUNT then this first Non-mailing lines can return as soon as possible. Select when not existing (choose from your _table status & lt; & gt; 2) Then your message as 'Y' ELSE 'N' END You do not know the status of RDBMS You may have to add DUAL to at the end of the dependency on the taste.

c# - WPF correct way to set a bool while a key is pressed -

I need to set WPF a boolean variable (and some other actions besides this), while a key is pressed To wit. Pressed to set on key, and the key is released to reset. Something that I can do only by event handlers: this.KeyDown + = New KeyEventHandler (MyModuleView_KeyDown); This.KeyUp + = New KeyEventHandler (MyModuleView_KeyUp); Bull MyFlag = Incorrect; Zero MyModuleView_KeyUp (Object Sender, KeyEventArgs E) {if (e.Key == System.Windows.Input.Key.Space) {MyFlag = false; ...}} Zero MyModuleView_KeyDown (Object Sender, KeyEventArgs e) {if (e.Key == System.Windows.Input.Key.Space) {MyFlag = true; ...}} But I suspect the WPF can be done more accurately. I am trying to use a command approach, but the way I do it can set a variable on on fact when pressing only one key, but While the key is not pressed. Private Static RoutineIiCom mymode; Input gesture clip input = new input stewardess (); Inputs.Add (new keyGesture (key Space, "Space")); MyMode = New Routad UICOM ...

database - ADO.Net EF, Class Inheritance LINQ-SQL Query Syntax? -

Image
मेरे पास निम्न ADO.Net इकाइयां हैं: मैं क्या करने में सक्षम होना चाहता हूं, लोनएंडो आईडी के आधार पर गेम का समूह चुनें I.E सभी खेलों में जहां ऋण लिया गया हो == 1। मैं समझ नहीं पा रहा हूं कि मैं यह कैसे करूँगा? यहाँ मैं कैसे कोशिश की एक उदाहरण है, लेकिन मैं LibraryItems के लिए एक सूची और कोई विकल्प नहीं मिलता है। LanedTo (मुझे आशा है कि यह समझ में आता है) यहाँ एक उदाहरण है: मैं इसे कैसे प्राप्त करूं? क्या SQL सिंटैक्स? धन्यवाद! :) आप इस तथ्य से अपने खेल की सूची को फ़िल्टर करना चाहेंगे कि लाइब्रेरी इटैम का संग्रह ऑब्जेक्ट में कम से कम एक ऑब्जेक्ट को ऋण के साथ हो सकता है = 1। सही? अपने प्रश्न को सटीक रूप से वाक्यांश की कोशिश करें, क्योंकि आमतौर पर आप जिस कारण से फंस रहे हैं वह यह है कि आप सवाल को स्पष्ट रूप से पहले परिभाषित नहीं कर सकते जगह। एलोस, अगली बार, अपने कोड में टाइप करें। सिर्फ एक तस्वीर पोस्ट न करें यह उन लोगों को बनाता है जो आपको सब कुछ पुनः टाइप करने में मदद करने की कोशिश करते हैं - और यह कुछ लोगों को बंद कर सकता है। var games = डेटामोडेल में जी। मीडियाइ...

programming languages - MIPS - Create binary word of an order -

मेरे पास MIPS भाषा में निम्नलिखित कोड है: lw $ s5, -20 ( $ S6) उप $ t1, $ s5, $ t2 addi $ t1, $ t2, 50 मुझे प्रत्येक आदेश को इसके कोड में बदलने की आवश्यकता है: a। दशमलव बी में हेक्स सी में पहले ऑर्डर (lw $ s5, -20 ($ s6) के लिए बाइनरी 32 बिट्स में मैंने किया: a 35 | 22 | 21 | -20 बी। 23 | 16 | 15 | सी 3 प्रश्न: 1) क्या मैं सही हूं? 2) 32 बिट्स द्विआधारी के लिए कोड क्या होगा? 3) अन्य 2 अन्य आदेशों के अन्य कोड क्या हैं? धन्यवाद! ऑपरेंडों और निर्देश के प्रकार के अनुसार, कई एन्कोडिंग योजनाएं हैं, लेकिन ये सभी 32 बिट्स द्वारा रचित हैं और पहले छह निर्देश opcode (जोड़ें, एलडब्ल्यू आदि) निर्दिष्ट करें। रजिस्टर एन्कोडिंग : ये निर्देश केवल रजिस्टरों पर कार्य करते हैं। पहले छः बिट्स 0 हैं, अगले तीन पाँच बिट्स हैं जो क्रमशः पहले और दूसरे स्रोत रजिस्टर और गंतव्य रजिस्टर को निर्दिष्ट करते हैं। अंत में अन्य छः बिट्स हैं जो फंक्शन (एडी, सब इत्यादि) निर्दिष्ट करते हैं तत्काल एन्कोडिंग : ये निर्देश एक ऑपरेंड हैं जो कि स्मृति स्थान है । ओपोड के छः बिट्स के बाद पहली ...

c# - How to get the count from IQueryable -

By the article I'm applying paging in my GridView, I need two methods: Public IQueryable BindEmployees (integer startRowIndex, integer maximumRows) {EmployeeInfoDataContext dbEmp = new EmployeeInfoDataContext (); In the query query = dbEmp.Employees emp.DeptID on dbEmp.Departments join the department in dept.DeptID new selection equal {EmpID = emp.EmpID, EmpName = emp.EmpName, age = emp.ge, address = emp. Address, DeptName = dept.DepartmentName}; Return query. Skip (startRowIndex). (Maximum raus); } and public integer GetEmployeeCount () {// How can I not repeat the above logic to get the numbers? } How can I get the value of the second method GetEmployeeCount from the first method BindEmployees ? I mean without repeating logic (query) will be an option: Public IQueryable BindEmployees (integer startRowIndex, integer maximumRows, count out integer) {EmployeeInfoDataContext dbEmp = new EmployeeInfoDataContext (); In the query query = dbEmp.Employees emp.De...

c++ - Class interaction tips -

I'm amazed by some issues while trying to design interactive classes. Data from class B is either called as an indicator or standard container format, (or even more ambitious, and for STL containers as some shared APTR members) .), My method is to use a function that uses the same arguments and design class B method types according to the arguments? Is there a general rule of thumb to design interacting classes and share data between these classes? Can you please prepare a general plan for some common situations, which usually come into practice (and it is appreciated with some examples)? I think I should read some examples of class interaction in C ++, any signs on this are also appreciated? There may be a small sample: #include & lt; Iostream & gt; # Include & lt; Vector & gt; #include & lt; Iterator & gt; # Include & lt; Cassert & gt; using namespace std; Class A {public: A (at s, int val): sj (s), val (val), v (new vector & lieuten...

coldfusion - How to disable "AllowPrinting" for PDF generated in cfreport/cfdocument? -

Professional requirements say that PDF can not be printed. I have seen, and it says format = "pdf" is a permissions attribute, in which I allowed Can set up a list of permissions, including. However, the setting does not remove the printing permission permissions = "" I checked by the right catch on the Adobe Reader browser plugin - & gt; Document Property - & gt; Security, it says printing: permission " How can I disable printing? Thank you. cfpdf has found that the encryption attribute must be set before respecting the permissions attribute!

android - eclipse 3.6.2 download cant open folder -

I am trying to download Eclipse Classic in my Windows machine. (32.2 for version 32.2 Win) When I try to open the unzipped folder, it can be an error "Can not open folder" I think it is a problem with being uncomfortable I downloaded it three times Tried to do but still get the same error. Can anyone help me with this problem? I am downloading it as the first step of installing Android SDK. Check the downloaded file size against specified file size Is it the same? is? If it is different then your download can be corrupt. If this is the same - did you open it, or just try to open it?

c - thread-local storage overhead -

Assume that there are some non-reentrant functions that use global variables: Int i; Void foo (zero) {/ * Modified i * /} And then, I want to use this function in the multithreaded code, so I can change the code like this: / P> void foo (int i) {/ * modified i * /} or, using the gcc __thread specifier, more simple: __thread int i; After all, the advantage is that I do not need to change any other code which calls Fu (). P> My question is, how many overheads are there for thread-local storage? Is there no clear issue with TLS? Is there some overhead if I modify the TLSad variable by different pointer, like: __thread int i; Zero foo (zero) {int * p = & amp; I; / * P pointer * /} thanks And again, I want to use this function in multi-thread code, so I can change the code like this: void foo (int i) {/ This will surely not work because you will only modify a copy of i if you If you want to make changes, you should instead change the in...

iphone - Closing an app in the background -

Suppose I have an iOS app that is actually running in the background (for one of many legal reasons, such as background audio, requested time, etc.). What could happen if the OS shut down this app instead of running or suspending this race? How can I avoid them? How can I use the public API (inside this app) How can I trigger? Your app can be killed, it uses too much memory, if it EndBackgroundTask: , the timeout handler ( beginBackgroundTaskWithExpirationHandler: is called while specifying), if the user hits it clearly, if the app throws an exception , Call exit , triggers an EXC_BAD_ACCESS or other signal, and so on. There are probably other reasons too. To avoid these, do not use too much memory, call Endbacker Task: Create an app that will not want the user want kill, and the exception Do not throw, call exit , use invalid storage locations, and so on. There is no way to do this so that the user "" For others, you can allocate multiple memory, refuse to ca...

gson - Deserialising a generic with unknown compile time type where a field indicates the type -

This works but it's awesome - is there a better way? I have a general category that is in this simple example as follows Public Class Messaggraph & lt; T & gt; {@ Apply personalized T-message; Give an example of @ personal string type; Private string uri; } serialising is bad but trivial, eg, type type = new TypeToken. & Lt; MsgWrapper & LT; Information & gt; & Gt; () {} GetType () .; Gson.toJson (message, typeToken); The server receives JSO which can either Messaging If it notices 'will type' field 'notice' if it is a warning call 'type' field 'alert' At the moment I public MsgWrapper deserialize (JsonElement json, type typeOfT, JsonDeserializationContext context) throws JsonParseException {JSONObject object = json.getAsJsonObject () is executing a custom Deserialiser; If (object.has ("type")) {messagegrapper msgWrapper = new msgwrapper (); MsgWrapper.setType (object.get ("type...

ASP.NET 2.0 C# DAL Multiple Variable Parameters -

I am preparing a web app for querying a large database table based on the selection of users of the criteria. In some cases they can know and enter the primary key, second time they want to see the records of the status 'ABC' created in the last 7 days, or records created by 'Fred Smith', where the word 'proposal' 'Is included. The issue is, there can easily be 10 - 20 different variables which they can specify, depending on what they are looking at. It is quite easy for me to create SQL statement and dynamically apply parameters. Code behind the webpage (aspx.cs) This approach works well. However, I'm reading on using a BLL & amp; Team (or even that I was just a pulse), but all the examples which have been despised parameters getCategories (like) or a single parameter such as GetProductByID (int productId) I On the advice, it is on BPL / DAL with 20 variable parameters (for example) with many parameters (this is useful, but it is extremely...

image - Multiple jQuery Slideshows on 1 page -

(Update) I have a bunch of images group (like an album) I want to show everyone on one page. That's why I have a box with a single thumbnail of each album and use jquery to extend the box and change the thumbnails along with the slideshow of all the images for that album. & lt; Div class = "slideshowContainer" & gt; & Lt; Div class = "slide" & gt; & Lt; Img / & gt; & Lt; / Div & gt; & Lt; Div class = "slide" & gt; & Lt; Img / & gt; & Lt; / Div & gt; & Lt; / Div & gt; The jquery inserts a 'SlideInner' device around all these slides to swipe in the side. This is where the problem is. Because there are many examples of slideshows on the page, it only wraps around all divs with class 'slides' instead of people for that album, effectively leaving any other blank by dragging all the images in the slideshow for an album gives. The HTML is generated by PHP, so when I ...

iphone - Using self dot notation doesn't call dealloc -

My visual controller class's dellok method is not popped after being pushed with the following code: self.playerViewController = [[Videoplayer view controller alloc] init]; [Self. Player Week Controller Set_Video: Video]; [Self. Navigation controller Push ViewController: self Player. Animated controller: yes]; [Self. Playwear Controller Release]; However, if I change the push code to the following, then my viewlock is populated by the view controller after popping: playerViewController = [[ VideoPlayerViewController Alloc] init]; [Player view controller set_video: video]; [Self. Navigation controller Push ViewController: Animated Player Viewer: Yes]; [Player view controller release]; I thought I understood the use of dot notation / self, but not clearly. Can anyone explain the problem here? Here is the property: @property (nonatomic, retain) VideoPlayerViewController * playerViewController; And synthesis is here: @synthesize playerViewController; Yo...

Extending the Bitmap Class in Android? -

Is there a way to extend the bitmap class in Android? I think you can not do this, but I would like to create a class for a bitmap that represents a falling object (an indefinite number of this object will fall from the top of the screen, and each one has to do something Like detection of conflicts) Can I expand / implement bitmap classes to create this custom class? A Bitmap also does not know where it should be placed on the screen. Before coming into the animation, it seems that you need to represent your view by using some "visual object" objects or some other models that represent objects with coordinates in your scene You can. Each of these objects will be in the form of a bitmap one variable. Once this step is completed, then animating your objects can expand your "SceneObject" class with added functionality. / P> Your rendering function will explain your visual and layout bitmap according to the information of your models.

stl - Accessing c++ maps using a different class than the index -

मान लें कि आपके पास एक वर्ग है: वर्ग SomeClass {सार्वजनिक: int x; कुछ क्लास () {x = रैंड (); } बूल ऑपरेटर & lt; (कॉन्स्ट कुछ क्लास & amp; rhs) const {रिटर्न x & lt; rhs.x; }}; और फिर आपके पास यह है: मानचित्र & lt; कुछ क्लास, स्ट्रिंग & gt; हाँ; जाहिर है यह काम करेगा: हाँ [कुछ क्लास ()] = "वूट"; लेकिन ऐसा कुछ करने का एक तरीका है: हाँ [3] = "हुह"; काम कर रहा है? मेरा मतलब है, मैंने दूसरे ऑपरेटर के अतिरिक्त ऑपरेटर & lt; (int rhs) सेट करने की कोशिश की, लेकिन कोई पासा नहीं। क्या यह संभव है? नक्शा 's [] ऑपरेटर केवल templated वर्ग को अपने पैरामीटर के रूप में लेता है इसके बजाय आप चाहते हैं कि आपके क्लास के एक विशिष्ट उदाहरण को पैदा करने का कोई तरीका है, जिसकी आप चाहते हैं। इस उदाहरण में, एक कन्स्ट्रक्टर जोड़ें जो आपको मान x को निर्दिष्ट करना चाहिए। वर्ग SomeClass {सार्वजनिक: int x; कुछ क्लास () {x = रैंड (); } कुछ क्लास (इंट ए): एक्स (ए) {} बूल ऑपरेटर & lt; (कॉन्स्ट कुछ क्लास एंड आरए) const {रिटर्न x ...

html - How to display image with JavaScript? -

I am trying to display the image via javascript, but I can not understand how to do this . I have the following function image (a, b, c) {this.link = a; This.alt = b; This.thumb = c; } Function show_image () {document.write ("img src =" + this.link + "& gt;"); } Image1 = new image ("img / img1.jpg", "dsfdsfdsfds", "thumb / img3"); In HTML & lt; P & gt; & Lt; Input type = "button" value = "Vytvor" onclick = "show_image ()" & gt; & Lt; / P & gt; I do not know that I image1.show_image (); . Something like HTML should be? Or, somewhere else ... You can use this specially, see the method. You can create a usable function that will create an image like this ... function show_image (src, width, height, alt) {var Img = document.createElement ("img"); Img.src = src; Img.width = width; Img.height = Height; Img.alt = alt; // This next line just & l...

java - Why does Android only show the last Activity when using a for-loop? -

Maybe I have not been used for Android development, but when I see it, I hope everything is ordered To be done in When an activity ends, the next starts, however, it seems that my code does not work like this, for example take the following code: for (int i = 0; I & lt; 3; i ++) {intent to myIntent = new intent (Game.this.getBaseContext (), NextScreen.class); MyIntent.putExtra ("Some", i); MyIntent.putExtra ("Opp", oppList.get (i) .toString ()); StartActivityForResult (myIntent, 0); } This does not display an activity, wait for whatever you do on that screen, then come back for another activity. It immediately displays the third activity if I click on the back button on my Android emulator, it will show me two activity ... and if I click back again, then it will show me an activity ... then these activities on the screen are fast Sector fire will these activities you I'm not sure I like the first person without having to wait without him, even thos...

ios4 - Problem with FourSquare API calling after OAuth in iOS -

I am facing this problem while trying to use the Foursquare API with the iPhone. To get the token I'm starting at the beginning, I now have my application's customer ID and amp; Customer Secret and Oate Token & amp; Odd token secret for user I am using: https://github.com/jdg/oauthconsumer However, I'm not sure How to proceed from here to call the API I mean, if I do this - https://api.foursquare.com/v2/venues.json?geolat = -78.695548 & geolong = 35.767138 & amp; l = 10 & amp; oauth_token I get this answer: {"meta": {"code": 401, "error type": " Invalid_auth "," error dिपts ":" OAuth token was not found or canceled. "}," Reaction ": {}} Can anyone tell me what I'm doing wrong here? Thank you. - ahsan Please try this sample code and deepen this access In your code to get a token

c# - exception when using public static variables in public static class -

When I tried to use a static variable, with some public static variable near a public static class The exception was threw an exception to typing the beginner for 'EM_Image.staticvariables'. Why? And how can I solve it? public static class staticvariables {public static string image_source = "ahmed"; Public static bitmap b = new bitmap (image_source); Public Static Int K_numcolors = 0; Public static int M_leastbits = 0; Public static bitmap image bio = null; Public stable color [,] RGB_NU = new color [B. Wide, B. height]; // Basic color public static color [,] new_RGB_byte = new color [b. Wide, B. height]; // 1 public static string after color compression [,] RGBbIT = new string [b. Wide, B. Heights, 3]; // Original images public static string [,] new 1_rgbbt = new string [b. With, b. Heights, 3]; // Private zeros after compression 1) bt_Browse_Click (Object Sender, System.Windows.RoutedEventArgs e) {browse.ShowDialog (); Direction_text.Text = Browse. Filenam...

How Android App Updates Work -

If I make an app, when I make an updated version it will replace the original? Or can I edit specific parts? OK, it seems that you are talking about updates on the device (without any Uninstall). This will change the app on the device, though any files created by the previous version will be saved from the upgrade (including your shared preferences and DB files).

database design - Revenue data type in mysql? -

I'm setting up company pages, one of the fields is 'revenue', so from $ 0 I have hundreds of billions Can guess. So should this be a big data type in this area? Or is there a better way of collecting revenue in the database? Using MySQL Take a look at the data type.

objective c - \n does not skip to next line in NSString -

NSMutableString * a = @ "हाय"; NSMutableString * b = [एक स्ट्रिंगबैपिंग स्ट्रींग: @ "\ n \ n हाय फिर से"]; उपरोक्त कोई त्रुटि नहीं देता है लेकिन अगली पंक्ति पर "हाय फिर" डाल नहीं देता क्यों? EDIT2 मुझे पोस्ट करने के बाद एहसास हुआ, कि ओपी ने NSString में शीर्षक में, लेकिन कोड में NSMutableString डाल दिया। मैंने NSMutableString को NSString में बदलने के लिए एक संपादन सबमिट किया है। मैं इसे छोड़ दूंगा क्योंकि यह अभी भी उपयोगी है। ठीक है मुझे आश्चर्य है कि कोई त्रुटि नहीं देता है, क्योंकि आप NSMutableString को एक NSString दे रहे हैं। आपको दस्तावेज़ीकरण को पढ़ने की आवश्यकता है। आपको एक विचार देने के लिए // non mutable तार NSString * shortGreetingString = @ "हाय"; NSString * longGreetingString = @ "हाय फिर"; / * अस्थिर स्ट्रिंग - बनाया और एक चरित्र की क्षमता दी क्षमता के द्वारा वर्णित वर्णों की संख्या केवल डेटा संग्रहण की दक्षता बढ़ाने के लिए एक संकेत है। मान स्ट्रिंग की लंबाई को सीमित नहीं करता है * / NSMutableStrin...

Printing the contents of the program stack (C Language) -

संभव डुप्लिकेट: हाय, मैं जानना चाहूंगा कि वर्तमान प्रोग्राम स्टैक की सामग्री को कैसे मुद्रित करें (सी भाषा का उपयोग करके)। उदाहरण के लिए कहें। call_some_function () {... ... print_stack_till_now (); कुछ वापसी; } Call_some_other_function () {... ... print_stack_till_now (); कुछ वापसी; } मुख्य () {print_stack_till_now (); call_some_function (); print_stack_till_now (); call_some_other_function (); print_stack_till_now (); वापसी 0; } पिछला उदाहरण में (एक उदाहरण बिल्कुल नहीं हो सकता है :)) जब मैं print_stack_till_now () फ़ंक्शन को कॉल करता हूं, तब तक मुझे उस बिंदु तक बनाए गए मौजूदा स्टैक को प्रिंट करने में सक्षम होना चाहिए नए फ़ंक्शन कॉल प्रविष्टियां, वापसी स्थान, उनकी आर्गुमेंट इत्यादि) क्या सी भाषा में ऐसा समारोह संभव है (यहां तक ​​कि इनलाइन असेंबली भी) कृपया मुझे इस सिद्धांत (या मौजूदा कोड भी बेहतर होगा) को ऐसे फ़ंक्शन लिखने के लिए आवश्यक है। जीडीबी में हम वर्तमान स्टैक को देखने के लिए बैक्रे्रेस का उपयोग कर सकते हैं, मैं कुछ इसी तरह की तलाश कर रहा हूं। मुझे यह ...

java - Compile error in maven2: "invalid CEN header (bad signature)" -

I am migrating our Java-AE project to using Maven instead of anti. Dependency for & Lt; Version & gt; 5.4.2 & lt; / Edition & gt; & Lt; / Dependencies & gt; I get the following error when trying to compile [Error] The target org.apache.maven.plugins failed to execute: maven- Compiler-plugin: 2. 3.2: compiled (default-compile) JAdaptive on project: compilation failure [error] error: C: \ user \ user .VisitEL1 \ .m2 \ repository \ javolution \ javolution \ 5.4.2 \ javolution-5.4.2.jar Error ; Invalid CEN header (bad signature) [Error] - & gt; [Help1] org.apache.maven.lifecycle.LifecycleExecutionException: failed to execute target o rg.apache.maven.plugins: maven-compiler-plugin: 2.3.2: compiled on project (default-compile) Jedaptive: compilation failure Error: Error reading C: \ user \ user EVSTEL1 \ .m2 \ repository \ javolution \ javoluti \ 5.4.2 \ javolution-5.4.2.jar; Invalid CEN header (bad sign) on Org.apache.maven.lifecycle.internal.Mojo...

I created an xcode project with the same name and I accidentally overwrote the old project -

I have created an encoded project with the same name and I accidentally overwrite the old project. How do I get it back? All the old sources have gone and it is not in the garbage. It has all been replaced by new project template code. If you have backup / source control, you can resync your old version. / Li> Now what you back up / styling, and after it check out / leave it on your system, just try changing the project file (s), your source code and data Leave it in place. If you do not have source control or backup, and you have not deleted it, your code / data, you may still be in luck If you do not, then you have to recreate your project files with scratch instead of saving your last. None of them, and you have destroyed the source, then you are out of luck No difference It does not matter that your next step is to get source control and start using it and / or start automatic backup of your code. Everyone makes such a mistake, and this is why the so...

java - Calculating and storing precomputed average with Hibernate -

I have a set of products and each product has a set of reviews. Each review has one digit, I would need more of the average score, then I would need a real review of what precomputing on average and it has any best practice / clean methods of storage with hibernate. I am currently thinking of manipulating the review method of adding the review calculation and adding to the equivalent columns in the product table and updating the update calculation and yoga me It will be very happy to hear this in a cleaner manner. I would recommend placing a mismatched column on your parent table if two competitor requests amount column If you try to update, no one will fail or you risk to clone the amount to read randomly (unless there is not much traffic in the system ...). It is quite simple and any decent db should give good performance for a while (lazy psuedo sql / hkl): 1) Special average score for a product: / P> select counts (points) / reviews where product_id =? 2) ...

android - how to put some finishing touches (rounded edges and horizontal divider) on my custom tabs -

Image
This is the follow-up to my last question I wanted to make some small adjustments Passed the view by passing a view in the set indicator instead of character and icon Problem: Now I have to fully rebuild the tabs to feel and feel (I just want some small changes Was). Oh okay, I have some tabs working now which is fine. There are basically two things that I can not seem to relax. The main one is: (1) I have a horizontal bar right below my tab (the same color as the selected tab) by default These are my tabs : Here are some tabs The second is less important but it would be really good (2) how to actually show them like a tab instead of the rectangle (like the curved edges, the second image) It seems that I want to do it with divider. I'm not a graphic designer, though they have a good source for these images. Also, I want to do it in such a way that there is no hope of breaking in the future. Someone has any suggestion (especially Q: 1), which will be highly...

c++ - Updating screen to render camera position -

Using GLUT to use SLD / OpenGL has changed C ++ source. The problem is that since the 'camera condition has changed with GLUT, I am not updating, so instead of moving around instead of using the keyboard, the screen is just made and needs it and there is no updation goes. Keyboard strokes are working because I have set it up so when the ESC comes out of it and it's okay. Here's my display function, which is also called on every loop and quotes: glClear (GL_COLOR_BUFFER_BIT); GlLoadIdentity (); Camera.Render (); GlTranslatef (0.0, -0.5, -6.0); .... Remove some stuff .... SDL_GL_SwapBuffers (); Front camera. Render (); SF3dVector ViewPoint = Status + WatchDear; GluLookAt (Position.x, Position.y, Position.z, ViewPoint.x, ViewPoint.y, ViewPoint.z, UpVector.x, UpVector.y, UpVector.z); Now what happens when the key is pressed (W, which should move the camera): Case SDLK_A: CCAMERA (). Forward forward (-0.1); Display (); break; and finally CCAMERA (). MoveFor...

c# - How to prompt user if page is idle from last 5 minuts -

What is the best way to signal the user, if he is useless on the webpage for the past 5 minutes, I mean Knowing that the use of on web pages for the last 5 minutes is useless. Just set up some event listeners with timer to trigger a custom audience / event I suggest encouraging many unique user-driven events. I'm a little cheating and using jQuery for some demo codes, all of this can be done entirely in JavaScript, but it exists for jQuery like this thing: $ (window) .bind ('Mausammov mouseclick keydown mosaichel ... more listeners ...', inactive); Function useless (e) {if (window.idleTimeout) {clearTimeout (window.idleTimeout); } Window.idleTimeout = setTimeout (user idl, 300000); } Function userIdle () {// do either things here or trigger the "idle" event $ (window). Triggers ('inactive'); }

How to convert TSQL Datetime to Julian INT date -

I would like to know how to change the date in Julian Date Int to SQL, e.g. If my date was "01 March 2011", then how do I change it Julian Date (734197)? declare @dateim = '20110301' dated (d, 0, dd ) + 693596

c# - Strange webserver exception after patching web farm -

Text after " We have recently compromised our 12 servers, now that the following URLs were being executed across all servers killing the same URL as this Is ... (URL has been modified) System. Web. HTTP Exception - Invalid viewstate Stack trace: System.Web.Handlers.AssemblyResourceLoader on System.Web.UI.Page.DecryptStringWithIV (string, IVType ivType ) On . System.Web.IHttpHandler.ProcessRequest (HttpContext Reference) System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () System.Web.HttpApplication.ExecuteStep (IExecutionStep Phase, Boolean & Full Synchronous) update System.Web.Configuration.MachineKeySection.EncryptOrDecryptData (Boolean fEncrypt, byte [] buf, byte [] modifier, int32 start, int32 length , IVType system.Web.Handlers.ScriptResourceHandler.DecryptParameter on System.Web.Handlers.ScriptResourceHandler.ProcessRequestInternal on System.Web.UI.Page.DecryptStringWithIV (String S, IVType ivType) o...

.net - Asp.net mail sending + from id is over written by smtp user id -

I have a problem in the asp.net application. I am using SMTP server credentials to send email. A hostname, smtp.gmail.com, port number = 587, user name = "somemailaddress@gmail.com" contains password = one ???? One ????. I have created and mailed a mail message object and click on "email@gmail.com ????", "to@gmail.com" to find out. I am getting an email, but the ID is always taken as the username, somemailaddress@gmail.com. How does this happen? How can I change the e-mail address to @@@@@@@@@@@@@@@@@@@@@@@@@@ I think this is on Gmail server It is being thought that they want you not to send email from Gmail account like you sent it from another account. They are one of the ways to deal with spam. If you want to send email messages from your domain, you can use Google Apps.

winforms - How to communicate between Windows Form app and Web Site? -

We have developed a C # NET 2.0 Windows Form Application for Windows XP that controls built-in hardware / devices. Now, we need to add the AC # .net 2.0 web site (hosting within the same device by IIS) which can send commands to the Windows Forms Application (Example: Start Measuring) and get data. What is the best way to do this? We thought of the web service, but how to get a command from the web form web site can learn how to form a Windows application. Thank you. Note: A framework on the device .NET 3.x or 4 net Looking at this restriction on 2.0, .Net Remoting is a way to go into this situation. Html>

php - PHP5 Syntax Error in UrlEncoded string, missing a correct ' \ ' character -

प्रिय दोस्तों, कुछ वास्तव में पागल /% A /% E \% FD को हटाने के लिए अनुवाद सॉफ़्टवेयर को फड़फड़ाकर यूआरएल में आने पर, मैं यूआरएल अराजकता में कुछ ऑर्डर करने की कोशिश कर रहा हूं: $ search = array ('', ',', '/', '\' , 'Amp% 3B', '+', '-', '[', ']'); $ की जगह = सरणी ('-', '', '', '', '', '', '-', '', ''); जब तक मैंने ठीक काम किया तब तक '\' ने स्पष्ट रूप से एक विशेष वर्ण को जोड़ा? Q1 पहला सवाल: त्रुटि '\' कैसे मैं एक एकल (एक) \ ? Q2 को कैप्चर कर सकता हूं। Neigher & amp; या amp% 3B या & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; कैप्चर और ampercant? url से कैद करना है? क्यू 3 संवर्धन शक्से? कि मैं यह वास्तव में कालातीत बनाने के लिए भूल गया हूँ? दूसरे शब्दों में: यूआरएल में कोई अन्य विशेष वर्ण हैं जो '/' जैसे तर्क को तोड़ सकते हैं जो कि फ़ोल्डर संरचनाओं का प्रतिनिधित्व करता है, जिन...

Shell script & csv problem to write in a file -

I try to add information to an ACV file with a shell script. At this time I have information, my problem is that the CSV file is not empty at the beginning. So I would like to put the new information in the second column. But I can not find the way to do this. Here's my code: sed -i '1i column3' test.csv sed -i '2i ;; 4 'test.csv sed -i' 3i ;; 2 'test.csv I have output column 3 4 2 1 2 3 4 And I like it: 1 2 column 3 3 4 4 2 Do you think this is possible? Thanks What you should do in your example: sed -i '1s /.*/& amp; Column 3 / 'test.csv sed -i' 2s /.*/& amp; 4 / 'test.csv with awk (just leave the "-vOFS =, -F," part if you want to use the space as a separator): awk -vOFS =, -F, 'NR == 1 {$ 3 = "col3"; Print;} 'test.csv awk -vOFS =, -F,' NR == 2 {$ 3 = 4; Change the first column: awk -vOFS =, -F, 'NR == 1 {$ 1 = "print;}' ...

sql server - create view with indexes -

I would like to create a scene, which will present the same property as a table View Agent_view as Agent View I need to know that I need to make indexed in Agent_View similar to Agent_table Also. Do I need to declare Agent_View as schemabound to create an index? Is there any alternative way to make indexes without declaring as schemound? You can index the view with SELECT * because you are indexed Without having titration not just a macro that is spread in the external query. Therefore table indexes will be used anyway. The scene does not exist from a schema perspective. Finally, IMHO is probably the most useless use of a possible view, it adds zero value .

bison - How to compile LEX/YACC files on Windows? -

Image
I get lex and YACC files to parse my files ( .l file and .y file). How to compile those files and how to file them in the equivalent .c windows platform? for today (2011-04-05) Latest version of: After that, without a blank in a name Install complete in your directory of priority. I recommend that C: \ GnuWin32 Install it No in Default (C: \ Program Files (x86) \ GnuWin32) because the bison has a problem with empty space in directory names, not brackets for the sake of saying. In addition, consider setting up the default directory ( C: \ Dev-Cpp ) After that, to include bin directories of gcc (in C: \ Dev-Cpp \ bin ) and flex \ bison Set the PATH variable to C: \ GnuWin32 \ bin \ / code>). To do this, copy this: ; C: \ Dev-Cpp \ bin; C: \ GnuWin32 \ bin \ / code> and add it at the end of the PATH variable, which is defined by this figure: If this statistic is not in good resolution, then you see You can. Open a prompt, ...

php - how to compare two arrays and find the count of match elements -

मेरे पास दो सरणी हैं I $ ar1 = array ("Mobile", "shop "," सॉफ्टवेयर "" हार्डवेयर "); और $ arr2 = arry (" दुकान "," मोबाइल "," दुकान "," सॉफ्टवेयर "," दुकान ") मैं arr2 के तत्वों की तुलना arr1 यानी foreach ($ arr2 $ val) के रूप में करना चाहता हूं {if_array ($ val, $ arr1)) {// mycode mysql तालिका चर ++ में डेटा सम्मिलित करने के लिए; // यहां एक चर होना चाहिए जो कि $ arr2 में मिलते समय किसी भी मिलान के दौरान बढ़े हुए होना चाहिए ताकि इसे किसी अन्य तालिका में सहेजा जा सके। } $ Query = "अद्यतन तालिका सेट दुकान = '$ चर', मोबाइल = '$ चर' ......."; } $ चर एक पूर्णांक मान होना चाहिए ताकि बाद में उपयोग के लिए मैं इस वैरिएबल का उपयोग कर सकूं (इस उदाहरण में इसका मान 3 होना चाहिए) मैच को खोजने के लिए। मेरा प्रश्न यह है कि मैं कैसे वेरिएबल प्राप्त कर सकता हूं जो हर बार मिला हुआ मैच बढ़ता जाएगा। क्षमा करें , मैं पूरी तरह से अपने कोड के उद्देश्य को समझ नहीं है आप साम...

c# - Filter Data using EntityDataSource -

post text "itemprop =" text "> I use EF4, C # and MS membership provider. A EntityDataSource I have a GridView with data source Web Control I filter data EntityDataSource should be user, assume that these, like filters show currently connected using Application for MS Memebership Provider (Membership.GetUser ();). Now I have any parameters EntityDataSource that I think can not inf will allow DOT (where in / automatically generated using a go provided parameter expression). Do you have any ideas? Please provide me a sample of code, thanks for your time! "Text" itemprop = "text"> After you You can not force user to declare EntityDataSource directly in the markup as a declaration. But basically there are two functions: The first is easy, but the code-back is required you can use a normal asp: parameter and its value is code-behind You can set the user to identify: Markup: & lt; asp: EntityDataSource id = "MyEn...

c# - How can I make TextBox controls read-only when they are inside a disabled GroupBox? -

मेरे पास मेरे विंडोज फॉर्म के आवेदन में एक ग्रुपबॉक्स नियंत्रण है, जिसके अंदर मैंने कुछ टेक्स्ट बॉक्स नियंत्रण व्यक्तिगत TextBox को केवल-पढ़ने के लिए नियंत्रण करते समय मैं GroupBox नियंत्रण को अक्षम कैसे कर सकता हूं? जब भी मैं ग्रुपबॉक्स को अक्षम करता हूं, तब भी इसमें से सभी को TextBox नियंत्रण भी अक्षम हो जाता है। मैं समझ नहीं सकता कि उन्हें केवल-पढ़ने के लिए कैसे करें। जब आप एक कंटेनर नियंत्रण अक्षम करते हैं जैसे कि ग्रुपबॉक्स ), उसके सभी बच्चे भी अक्षम हो जाते हैं यही विंडोज में काम करता है; उस व्यवहार को बदलना संभव नहीं है। इसके बजाय, आपको प्रत्येक व्यक्ति टेक्स्ट बॉक्स को सही पर सेट करना होगा। यदि आप पूरे ग्रुपबॉक्स को अक्षम कर देते हैं, तो प्रत्येक Textbox नियंत्रण में भी अक्षम हो जाएगा, जो कि पढ़ने के लिए केवल की स्थिति को ओवरराइड कर देता है और रोकता है उपयोगकर्ता अपनी सामग्री की प्रतिलिपि बनाने से। एक बार जब आप अपने कोड के अनुभाग को तय कर देते हैं जो ग्रुपबॉक्स को अक्षम कर देता है, तो आप एक सरल foreach loop का उपयोग कर सकते हैं प्रत्येक ...

c# - Code to detect mobile browser support for HTML5 -

I want code (C # / Javascript) to find out which mobile browsers HTML5 is supporting I have a code to detect HTML5 (canvas) compatibility for the browser, but this code is not working for mobile browsers if (!! document.createElement ('canvas' GetContext) {This browser supports HTML5 (canvas)} and (does not support HTML5 ...) You can also use famous.

asp.net mvc 3 - Can MvcMailer use .aspx files instead of Razor -

I recently installed Mvcmailer, its default viewing engine is set on the razor I would like to know how (if possible If so, change it to ASP.NET View Engine Yes, as a default mailer Schollfolder ASPX scaffolders can set up. Use it: set-defaultskfolder -name mailer -soldolder mailer.aspx or you can use something like the following Malicious mailer Espex Welcomelmer Welcome, Hello

iphone - How do I build UITableViewGrouped in a Modal View? -

Image
I want to create a grouped view in the model view, which is the destination from "+" on the navigation bar in the main table view. I have written this code: - (zero) viewDidoadload {// titled self.title = @ "Set"; // addBtn UIBarButtonItem * addBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItem Add target: auto-operation: @selector (toggle editing)]; Self.navigationItem.rightBarButtonItem = addBtn; [ADBTN release]; } - {IBAction} toggleEditing {} create a subclass UITableViewController named MyTableViewController Usage presentModalViewController: Animated: Controller in your current view - ( IBAction) toggleEditing {MyTableViewController * tableViewController = [[[MyTableViewController alloc] initWithStyle: UITableViewStyleGrouped] autorelease]; [Self current model visualizer: animated table view controller: yes]; } And Where a line was selected.

Use of Clojure macros for DSLs -

I am working on a Close project and I often write myself close macros for DSL, Seeing how a company uses the closest in its real work and the speaker said that in practical use they do not use macros for their DSL, they only use macros to add a small syntax to the swell. Not. Does that mean that I should write my DSL to use standard functions and then finally add some macros? Update : After reading many different (and entertaining) reactions on this question I have realized that the answer is not clearly clear as I thought earlier, for many reasons From: There are many different types of APIs (internal, external) in the API Many types of API users (Business user who wants to hurry up, Closer Expert) Whether the Boiler Plate Code Do you have a macro to hide? I will go far away thinking about the question more deeply, but thank you for your reply, because they gave me a lot of things. Apart from this, I saw that Paul Graham Cristof thinks in contrast to the video and...

the php extension for mysql -

मैं बस एएक्स 5.2 पर apache, php और mysql rpm को स्थापित करता हूं, लेकिन मैं phpinfo में mysql जानकारी नहीं देख सकता पृष्ठ, मैं जानना चाहूंगा कि कैसे mysql के लिए PHP एक्सटेंशन बनाया है कि मैं php स्क्रिप्ट में mysql फ़ंक्शन कॉल कर सकता हूं। धन्यवाद लिनक्स वितरण में सामान्य रूप से PHP के MySQL एक्सटेंशन के लिए एक अलग पैकेज है, ऐसा लगता है कि AIX उसी नियम का अनुसरण करता है "Php-mysql" नामक एक अनइंस्टॉलेड पैकेज या इसके जैसा कुछ देखें।

jsf - Datatable paginator is not displayed -

I am creating a very simple database with JSF 2.0 tag data, but for some reason the page pager was not displayed has gone. Why is it like this? & lt; P: datable var = "waste" value = "# {resultsController.allGarbage}" pgener = "true" rows = "10" & gt; & Lt; P: column & gt; & Lt; F: Aspect Name = "Header" & gt; & Lt; H: OutputText value = "filename" /> & Lt; / Ch: Aspect & gt; & Lt; H: output text value = "# {garbage.filename}" /> & Lt; / P: column & gt; & Lt; P: column & gt; & Lt; F: Aspect Name = "Header" & gt; & Lt; H: output text value = "description" /> & Lt; / Ch: Aspect & gt; & Lt; H: output text value = "# {garbage.description}" /> & Lt; / P: column & gt; & Lt; P: column & gt; & Lt; F: Aspect Name = "Header" & gt; & Lt; H: outputtext value = ...

ruby on rails - Problem with nested resources with Kaminari pagination gem -

Can not find cameraman to work with nested resources. Here is a description of my problem if anyone was able to deal with this issue, thinking it. My routes look like this: Resources: Artists do the resource: end of pictures In my opinion, my Is nearby: lt;% = Paganet picture, params => {: Controller = & gt; 'Paintings',: Action => 'Index'}%> The initial / base URL looks like this: http: // localhost / artists / foobar / paintings But clicking on a cameraman paged link will send the URL to: http: // localhost / paintings? Artist_id = foobar and page = 2 This is considered: http: // localhost / artists / foobar / paintings? Page = 2 I still have the same problem - if anyone else on this page When I end up, I solve it: In the routes. RB requires you to move your "outer" route for your nested bottom, so if you had: resources: question processing: topic_assessor processing: end the question You need to ch...

ios - UITableView clicking on an item an opening a new screen/view/activity -

I consisting of items such as a table view (HomeViewController): Reporting Setting Let me know The items being happening as separate files (Location View Controller, Reporting View Controller and View View Controller). If a user clicks on the location then a new screen / activity / view should be open and the same for the remaining items. Someone can type help.my please type: #import "HomePageController.h" @implementation HomePageController @synthesize menuList, table; // Apply Endload to make additional setup after loading the View View, usually by a nibb. - (void) viewDidLoad {menuList = [[NSMutableArray alloc] initWithObjects: [NSArray arrayWithObjects: @ "location" zero], [NSArray arrayWithObjects: @ "reporting" zero], [NSArray arrayWithObjects: @ "Settings", null] , [NSArray arrayWithObjects: @ "password", null], [NSArray arrayWithObjects: @ "help" zero], [NSArray arrayWithObjects: @ "about...

wifi - Android WPA/8021X self signed cert -

I am writing an app so that users can easily connect to enterprise wireless networks with API or TTLS and one proof. I can add an EAP based WiFi profile and connect it to wpa_supplicant in the network through the correct credentials and certificates. Partially thank you The establishment of a certificate is proving difficult though. At this time, to open a php file with an appropriate file I see the Authenticator using the WebVeiw in the application. This brings a certManager example that is necessary for a user's name certificate Is there a streamlined way to install a CA cert on Android? By far my search, I do not feel like. Pre> Enter code here Certificate proof = Zero; // Some intentions = some code ("android.credentials.INSTALL") to get the new intent; Intent.putExtra ("Name", "Swansea Uni WiFi Proof"); {Try intent.putExtra ("CERT", cert.getEncoded ()); } Catch (certificate encoding exception e) {e.printStackTra...

alphabetic indexer in android -

I have a population list viewable from the database, I have my scroll view with Fast Scull enabled, show the scroll bar widget. But the sequencing is not working, can anyone help? Take a look at this post ....

c# - data binding to html tag in asp.net -

I was just wondering if it would be possible to pair data using html code using DataBinder.Eval For example, with the runat = server attribute, I have to do something like this: & lt; A href = & lt;% # DataBinder.Eval (container.datetime, "file_name")%> Runat = "server" /> But it does not work. Does it mean that I want to use the asp.net hyperlink control? Cheers, Stephen Try it instead Do: & lt; A href = '& lt;% # Eval ("file_name")%> '& Gt; Link text goes here ... & lt; / A & gt;

ruby - passing chained scopes as params on rails 3? -

मेरे पास यह मेरे विचार पर है: & lt;% = link_to "शर्ट" Things_ path (: scope = & gt; "शर्ट")% & gt; यह मेरे नियंत्रक पर @products = Product.send (params [: scope]) हालांकि मैं श्रृंखलित स्कोप का प्रयोग करना चाहता हूं जैसे: & lt;% = link_to "शर्ट", products_path (: scope = & gt; "shirts.blue")% & gt; लेकिन किसी कारण से यह काम नहीं करता। शायद मेरी वाक्यविन्यास गलत है? इसे आज़माएं & lt;% = link_to" शर्ट ", products_path (: scope = & gt;" shirts.blue ")% & gt; मॉडल @products = उत्पादकैड पैरामीटर [: गुंजाइश] .split ("।")। प्रत्येक {| गुंजाइश | @ प्रोडक्ट्स = @ उत्पादों.send (स्कोप)}

c++ - Debugging in Code::Blocks doesn't seem to work - missing debugging symbols -

I am trying to debug a program in Code :: Blocks. I followed myself and as far as I could, but debugger does not stop at breakpoints ... I saw what was an unresolved (I was not sure I wanted it Bump or open a new one with more details), I have to mark the "debugging symbols [-G]" flag. Adaptation and all the symbols "-s" are also disabled. I also tried flag- GGDB, no success. I am using TDM-GCC 4.5.2 (I have just upgraded, I had the same problem with 4.5.1 earlier), and debugger GNU GDB 7.2 (GDB First issue with 7.1). I'm on Windows 7 X64 using code 7 blocks SVN 7040 (which is the latest build of night, as far as I know they do not often update updated static updates) (I have one in SVN 6931 Was the only issue). Finally, I also learned that debugger complains about debugging deficiencies, here the output is given in the Debugger window: create successful The goal of creating: inserting debug source: G: \ [...] \ IPCMB3 \ Source Adding: G: \ [...] ...

c++ - Indices for Files -

What is the specific type used to store a pointer in a file? I am currently using long unsigned int , but does this make sense? Instead, should I use std :: size_t , or does it even make sense? As Mike Samor says, if you work with C ++ io currents Std :: streampos is a standard type for representing a file position. See Note that std :: size_t can not be correct. For example, on 32-bit systems, std :: size_t would be a 32-bit signed integer, while the system would probably support files greater than 2 ^ 32 bytes = 4 GB. In the FOIWW, POSIX world, there is a (signed) integer type OF_T that is used to represent file size and offset. With different macros (such as on _FILE_OFFSET_BITS = 64 on Linux) it can redefine off_t to become a 64-bit type.

asp.net mvc - Unable To Cast a Partial Class based on LINQ-2-SQL Object -

Say I have a database table that I drag over to drag on my Linq-2-SQL DBML file. This is called me an animal. Then I am creating a square to expand it like: public partial class animal {/ my extra code here} But I also want to do this, there is a class like this: public class zebra: animal {// even extra additional code } The problem is that I receive an invalidcast exception from my repository, when I do this: animal a = dataContext.Animals.Where (c = & Gt; c.id.Equals (ID)) SingleOrDefault () .; Return (Zebra) A; I have snatched my classes in the place where it is completely empty in an effort to work, so it does not work. no benefit. This casting process was used to work in a non-LINQ-2-SQL project, which is switching to MVC / LINQ. Too many Googling stumped completely on this ... Assume this can not be done, what is the best alternative approach? Interface? Jake This does not work because a zebra is a beast, not all animals Zebras are when...

java - Spring Security : Redirecting to login page if the authentication failed -

We have two ways to enter. Username and password are sent in the request headers by another app. IT is checked and if the username and password are correct, then it goes inside. [A custom filter has been written for it] If the username and password are not present in the request headers, the login screen is presented. When the username and password are present in the request header and if this is incorrect, then I have been shown the HTTP status 401 - authentication failed: bad credentials page. How can I fail to authenticate the entry page in this case below security.xml & lt code;; Http auto-config = "true" usage-value = "true" & gt; & Lt; Access denied - handler error page = "/ login.jsp" /> & Lt; Intercept-url Pattern = "/ * Login" "Access =" Harol ('ROLE_ANONYMOUS') "/> Intercept-url Pattern =" / * "access =" Harol ('ROLE_USER') or Harol ( 'ROLE_ADMI...

vb6 - Threading In VB 6 ! -

How do we get threading in VB6? Can someone describe with a simple example? Thankx in advance! Threading, this is not easy by nature. I take care to take care of you. Normally it is done with ActiveX X. This is one.

c - localtime returns null -

Tap return on local time. Why? (I'm using Visual C ++ 2008) struct tm * tb; Time_t lDate; Time (& amp; lDate); TB = Local Time (& amp; lDate); // TB all the time I'm trying this! Is this your exact code? I compiled this program and it works fine: #include & lt; Stdio.h & gt; # Include & lt; Time.h> Int main (int argc, char ** argv) {struct tm * tb; Time_t lDate; Time (& amp; lDate); If (lDate == -1) {false ("time"); Return 1; } TB = Local Time (& amp; lDate); If (TB == faucet) {fprintf (stadder, "locktime fails \ n"); Return 1; } Printf ("Good \ n"); Return 0; }