Posts

Showing posts from September, 2012

entity framework 4 - How to clean/Reset ObjectContext in EF 4 -

I have a sorted structure with millions of records. I have been making a recursive scan on DB to update some connections and some data I am the problem that I get an exception exception because the entire DB is finally loaded on the reference (lazy). That data needs to be in the context of no reference. I can not use references (reference ...) because I want to reference the context because I am doing a recursive scan. Please take recurring as a fact. Thank you Such an operation is not really well controlled and neither the institutions By using it it is well done on the scale. I support stored procedures for batch ops. If you want to remove / dump objects from the context, then I believe that some information (solution to your problem below) is.

c# - Persian Calendar Problem with CultureInfo -

What's wrong with this code? // Error (exception) Message: Valid Calendar System for an Unrecognized Culture. Globalization. CulverInfo CI = New System Globalization. Crop ("FA-IR"); Ci.DateTimeFormat.Calendar = New system. Globalization.PersianCalendar (); Application.CurrentCulture = ci; And what's the solution? Can I add a calendar type to the Windows XP regional option? :) A filthy reflection-based solution is here:

php - Whats the best way to do an external search with dynamique content? -

I want to create an external search function for other websites to be able to search in my database. Now I have the problem that there are many drop-down boxes in which there is a dynamic content, which means the content comes from the database. This will only work if the external search plugin includes a php file that receives content from the database. But imagine now that people who do not use PHP, they want to search on their website. Maybe I am missing the point, but why do not you have some CGI behind the "Phfinini database search" link Can you put it? The CGI can search anything, especially with the dynamic content of any dropdown or something else. - Pete

mysql - Replacing \r\n with PHP -

I have a post form that includes my text in a MySQL database. I use $ post_text = mysql_real_escape_string (htmlspecialchars ($ _ POST ['text'])); Want to automatically change and \ r \ n I tried $ Text = str_replace ('\\ r \\ n', '', $ text); $ Text = str_replace ('\ r \ n', '', $ text); $ Text = str_replace ('\\ R \\ N', '', $ text); $ Text = str_replace ('\ R \ N', '', $ text); $ Text = str_replace ('/ \ r \\ n', '', $ text); $ Text = str_replace ('/ r / n', '', $ text); $ Text = str_replace ('/ \ r \\ N', '', $ text); $ Text = str_replace ('/ R / N', '', $ text); but \ r \ n is always included in my database entries. How can I fix this? The main problem with all the changes you make is that both \ n and \ r are escape characters that are saved only when you use them in double-quoted strings in PHP '\ r \ N ...

java - Getting hibernate entity error -

I'm using hibernate in the Spring app but due to some problem I can not use spring injection, so manually Session is to announce a declaration like factory below As I am using annotations in the unit class, I get the following error org.hibernate.MappingException: unknown entity: com.vaannila .domain.Registration & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Hibernate-Configuration PUBLIC "- // Hibernate / Hibernate Configuration DTD 3.0 / N" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> & Lt; Hibernate-configuration & gt; & Lt; Session-Factory & gt; & Lt ;! - We are using MySQL database so that the quote with MySQL - & gt; & Lt; Property Name = "hibernate.dialect" & gt; Org.hibernate.dialect.MySQL5InnoDBDialect & lt; / Property & gt; & Lt ;! - Enable it to see the SQL statement in the log - & gt; & Lt; Property...

PHP Remove key from associative array -

I have a PHP array that looks like this: index key value [0 ] 1 Waiting for confirmation [1] 2 constituted [2] 3 in progress [3] 4 full [4] 5 Mark as spam When I assume the var_dump array So I get this: / P> array (5) {[0] => Array (2) {["key"] = & gt; String (1) "1" ["value"] = & gt; String (25) "Waiting for confirmation"} [1] = & gt; Array (2) {["key"] = & gt; String (1) "2" ["value"] = & gt; String (9) "Assigned"} [2] = & gt; Array (2) {["key"] = & gt; String (1) "3" ["value"] = & gt; String (11) "in progress"} [3] = & gt; Array (2) {["key"] = & gt; String (1) "4" ["value"] = & gt; String (9) "full"} [4] = & gt; Array (2) {["key"] = & gt; String (1) "5" ["value"] = & gt; I wanted to remove "marked" as "full...

flash - Using custom graphical assets in pure AS3 project -

I have created some button states in Flash (SCC), and I want to use them in pure AS3 project. They are movie clips with the class of neatButton_on and neatButton_off respectively, I call them like this: public class neatButton neatModule {private var stateOn: neatButton_on; Private Enmity State Off: Newbutton_off; Private var modContainer: Sprite = New Sprite (); Public Function Button () {addChild (modContainer); ModContainer.x = 200; ModContainer.y = 200; Stateof = new newbutton_off (); Stateon = new button_on (); ModContainer.addChild (stateOn); ModContainer.addChild (stateOff); ModContainer.addEventListener (MouseEvent.MOUSE_OVER, Hover); ModContainer.addEventListener (MouseEvent.MOUSE_OUT, Revoked); } Private function hover (e: MouseEvent): zero {stateOff.visible = false; } Private function unhur (e: MouseEvent): zero {stateOff.visible = true; }} My question is, is this the best way to do this? I've used assets specifically for different states of the same item, wher...

javascript - livequery doesn't bind after a DOM insertion -

I do not understand that Livequaar does not bind this phenomenon, but I have to use it. This is just an example that can use .click (), but in the actual code I have been forced to use livequeries. Does anyone know why liveQuality is not working? function bind_remove (comment) {var id = comment.attr ('comment_id'); Comment.find ("remove"). Livequery ("click", function (e) {$ .post ("/ deletecomment", {id: id}, function (response) {comment.remove (); comments = comments_container .find ('comment'); });}); } $ (Document) .ready (function () {var comments_container = $ ('# comments_container'); var Comment = comments_container.find ('comment'); comments.each (function () {bind_remove ($ (this) (;);}); $ (". Submit_button"). Livequery ("click", function (e) {$ .post ("/ new comment", {text: textarea.val ()}, function (feedback ) {Comments_container final () .andend ($ (feedback) .Fadeine (...

iphone - Orientation portrait and landscape mode -

I have 2 large logo images are fine in landscape mode when I turn into portrait mode, my images on each other Are they too big for IB alignment Can I set different views for each orientation? Or how can I fix this problem? Update in response to the newsletter. Do not use shouldAutorotateToInterfaceOrientation This method is for some more. Your methods: - (minus) WillRotateToInterfaceOrientation: (UIInterfaceOrientation) interfaces period: (NSTimeInterval) period - didRotateFromInterfaceOrientation (zero): (from UIInterfaceOrientation) interface orientation The first is called before the rotation and the second interface is said only after the orientation. You should change the view of the UIViewController here or you can change the images here for different tilt here.

Why does python dict behave this way? -

मेरे पास कुछ कोड लिखे हैं जैसे: class आमंत्रित करें (models.Model): STATE_UNKNOWN = 0 STATE_WONT_PLAY = 1 STATE_READY = 3 STATE_CHOICES = ((STATE_UNKNOWN, _ ("अज्ञात")), (STATE_WILL_PLAY, _ ("हाँ, मैं खेलूँगा")), (STATE_WONT_PLAY, _ ("क्षमा करें, ) ()), (STATE_READY, _ ("मैं अब खेलने के लिए तैयार हूँ")) ... def change_state (स्वयं, राज्य): जोर देकर कहते हैं (राज्य में (निमंत्रण। STATE_CHOICES)) यह कोड काम करता है जैसे मैं चाहता हूं, लेकिन मैं उत्सुक हूं कि यह इस तरह से काम क्यों करता है। यह स्पष्ट रूप से बहुत सुविधाजनक है कि यह इस तरह से काम करता है, लेकिन ऐसा लगता है कि शायद मैं कुछ अंतर्निहित दर्शन को याद कर रहा हूं कि ऐसा क्यों है। अगर मैं कुछ ऐसा करने की कोशिश करता हूं: dict ((1,2,3), (2,2,3), (3,2,3)) मान त्रुटि: शब्दकोश अद्यतन अनुक्रम तत्व # 0 की लंबाई 3 है; 2 {1: (2,3), 2: (2,3) की तरह लग रहा है ऐसा लगता नहीं है , 3: (2,3)} तो सामान्य पैटर्न को ट्यूपल के पहले हिस्से को कुंजी के रूप में नहीं लेना चाहिए और शेष को मूल्य के ...

delphi - Adding Custom control to another custom control -

What I'm trying to do is to create a new touch keyboard. I did this button with the button I picked up, now I need to make several buttons and move them somewhere. It was stuck to me. I have created a new component that I get from TGraphic Control (this is my new touch keyboard), but I do not have a way to add components to the canvas. I really do not know if I want to add them to canvas or any other component (like panel) !!! Is my attitude okay? Thanks in advance. Due to your words and confusion between panel, canvas and custom control in general, I assume you I'm starting a Delphi. You need to know about frames: Frames allow you to make a reusable part of the GUI. You can use the IDE to "draw" the frame. If you do, then you put that overall control (frame) on the form or another frame It is a very powerful feature and it is customary that it is very close to telling other languages ​​"custom control" (very close to ASP.NET or WPF that c...

c++ - How to add strings to a 2d array of char elements? -

मेरे पास सी प्रोग्राम में लिखे गए प्रोग्राम हैं: #include & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; Int main () {int age [5]; चार नाम [5] [10]; उम्र [0] 10 =; उम्र [1] = 20; उम्र [2] 30 =; उम्र [3] 25 =; उम्र [4] 40 =; नाम [0] = "abc"; नाम [1] = "abc"; नाम [2] = "abc"; नाम [3] = "abc"; नाम [4] = "abc"; Cout & lt; & lt; name [0] & lt; & lt; "है" & lt; & lt; उम्र [0] & lt; & lt; "साल पुराना"; अदालत के & lt; & lt; "\ n"; Cout & lt; & lt; नाम [1] & lt; & lt; "is" & lt; & lt; उम्र [1] & lt; & lt; "साल पुराना"; अदालत के & lt; & lt; "\ n"; Cout & lt; & lt; नाम [2] & lt; & lt; "is" & lt; & lt; उम्र [2] & lt; & lt; "साल पुराना"; अदालत के & lt; & lt; "\ n"; Cout & lt; & lt; name [3] & lt; & lt; ...

Android: Google Data API - 401 Token Invalid Error -

Well, I tried to use the account manager and I'm getting a "401 token invalid" error. What could be the reason. debug log account name = xxxxxx@gmail.com is token: start DQAAALIAAAAh-xxxxxxx Google DATA API loader ----------- - ----- Inserting the ----------------- token inside the Google Notebook loader: The DQAAALIAAAAh-XXXxx URL is: https://docs.google.com/feeds/ Getting default / private / full exception Docs feed: 401 Token invalid Google Data API loader ----------------- Sample Code: Log D. ("Main", "\ tInside GoogleData API -----------------"); Http transport transport = new net HTTPS transport (); GoogleHeaders Header = New GoogleHeaders (); Log D. ("Main", "\ t setting token:" + authToken); Headers.setGoogleLogin (authToken); Headers.gdataVersion = "3.0"; Transport.defaultHeaders = Header; AtomPaster Parser = New Atomers (); Parser.namespaceDictionary = Namespace. DICTIONARY; Transport.addParser (pa...

apache2 - Problem with virtual host on Apache 2 - Not directing to appropriate virtual host -

So I have two different sites on the same IP. Actually I can only move from one domain to a certain folder or I want to direct traffic to a separate folder from another domain. I read this page ..., and set my sites-enabled config file to look like this, but my second domain just triggers traffic on my original site then ... domain 1: cdphoto.uni.cc Domain 2: wtfdoidoatubc.uni.cc and my configured file appears Thanks for any suggestions! In this situation it would be a good idea to use your control panel and add a redirect You are planning to use the main part of your site for something. But if there is no redirect rule from your host control panel then the best and easiest option will be there.

android - Server side security -

As part of the open source Android project, I have a very simple web server running on top of Amazon EC2. We are thinking of integrating the component taking a picture into the application. This data will be stored on the server and other clients will be excluded. At this time, the application is anonymous - no login is required to post information. Do I have the possibility of continuously taking pictures down because this app is missing? Or can I trust the flag system to handle such a situation? I have not implemented anything like this, and I do not know what to expect. I would like to hear from any person who has created such a service, and there are some ideas that are necessary to open this public service like this. If you expose an expiry status of the Internet which allows images to be uploaded and shared Gives you without certification, you will probably participate in issues. In fact, even if you need certification, you probably will get problems. I would definitel...

Android Raw Array -

मेरे पास ध्वनि की एक सरणी है int mySounds = {R.raw.sound1, R.raw.sound2, R.raw.sound3} बाद में mp = MediaPlayer.create द्वारा ध्वनि बना रहा है (यह, मेरी ध्वनि [0 ]); mp.start (); सोच रहा था कि क्या किसी भी तरह से सरणी में स्ट्रिंग्स का उपयोग करने के लिए भी है स्ट्रिंग माईड्स = {"sound1.mp3", "sound2.mp3"} हां, यह संभव है। आपको getIdentifier स्ट्रिंग mySounds = {"sound1", "sound2"} का उपयोग करके संसाधन को देखना होगा; Int mp3Resource = getResources ()। GetIdentifier (मेरी ध्वनि [0], "कच्चा", स्ट्रिंग पैकेजनाम); एमपी = मीडियाप्लेयर.क्रेडिट (यह, एमपी 3 रिसोर्स); mp.start (); संसाधन नाम एक्सटेंशन के बिना हैं तो यह sound1.mp3 नहीं है, लेकिन ध्वनि 1।

Two identical git repositories -

We are using GIT for the source code of our project working in a large team. Now half of the developers are going for the on-site phase of the project. This phase will involve huge development, i.e. many people leaving behind the second half and will continue to work on the code. Unfortunately on the site there will be only intermittent and unreliable internet connection. Still it is important that the site-site team is able to synchronize their changes between each other (commit / push / pull). But it is also important that the changes made to the "central" GIT repository are available by the rest of the team in the office. So I'm looking for a setup that will allow the site to work efficiently to use GIT on the site, even if the Internet is down for a long time, but also to synchronize Be able to be in office when the internet is available. Is that an easy and stupid to do this? My first idea: to work as a "server", take a netbook and have a small ...

uitableview - how to use tables in Matlab -

Image
I want to know how do I sort the row in the table, by row, by the numbers, and then in each color Line up the cell in which it has a high number. I searched the web a bit and found this "set handle (qualified 2, 'data', {5,6,4})" but this is not helping me because I want to fill the row in the row , And the row data has been changed in this method. This is the table as you see that there are 7 rows and 10 columns. Each column has the correlation points of the plate points against the sample digits (0-9). In this way I have correlation function [Scores] = I call compute_corr (points); I execute this call 7 times for each plate number. Score is an array that delivers correlation points in each call, and points are a digit from the plate. Thanks in advance. I do not believe that there is a way to update data incrementally, An array should be maintained, that line must be updated from the line, and after calling the set (..., 'data', actual d...

actionscript 3 - Manage Flash project -

I'm developing a flash project that should have 100 .fla files For example, they are one. If I change this class, then I will need to compile all the dependents. Flow manually How fast can this process be made? I will do it in three ways: 100 FLA files Instead, there is an FLA in which parameters / items to 'swap' certain parameters that you want to change, e.g. Through a menu, embed SWF, or some parameters on javascript. If possible, make it a code-based Action Script project and use the command-line MXLLC compiler which is included with Flex SDK. After that you can create a batch or messe file which will create SWF files. You can use the Flash IDE scripting language, JSFL so that the FLAA compilation can be automated. I have done this successfully on some projects. .

html - Displaying one div on top of another -

मेरे दो divs के साथ कुछ HTML है: & lt; div & gt; & Lt; div id = "backdrop" & gt; & lt; img alt = "" src = '/ backdrop.png' / & gt; & lt; / div & gt; & Lt; div id = "पर्दा" शैली = "पृष्ठभूमि-छवि: url (/curtain.png); पृष्ठभूमि-स्थिति: 100px 200px; ऊंचाई: 250px; चौड़ाई: 500 पीएक्स;" & gt; & amp; nbsp; & lt; / div & gt; & Lt; / div & gt; मैं "पृष्ठभूमि" के शीर्ष पर दिखाई देने के लिए दूसरे div ("पर्दा") चाहता हूं। दो divs एक ही आकार रहे हैं हालांकि, मुझे यकीन नहीं है कि दूसरी डिवीजन को दूसरे के ऊपर कैसे स्थान दिया जाए। आपकी मदद के लिए धन्यवाद! सीएसएस स्थिति: निरपेक्ष; का प्रयोग करें शीर्ष: 0 पिक्सेल; प्रत्येक div का शैली विशेषता में 0px; छोड़ दिया गया है पिक्सेल मूल्यों को आप जो चाहें बदलें। ऊर्ध्वाधर "आदेश" सेट करने के लिए z-index: x; का उपयोग कर सकते हैं (जो कि "शीर्ष पर" )। x को किसी संख्या के साथ बदलें, उच्च संख...

iphone - How to display the exact line of code causing application crash in xcode 4 debugger like in xcode 3.2 -

I've recently downloaded the encoded 4 and I've read the xcode transition guide, however, I'm still thinking How do I get it in Xcode 4 as the feature for debugger in xcode 4. When I run the program in xcode 3.2 and run my application, if my code causes crash in program, I could press command + shift + y and i will see debugger mode which Shows which lines crash, however, I can not seem to work on it for xcod 4 I know that I actually see the cause of the accident after seeing the staxtrares, however, that actually saved me time in xcode 3.2 in that functionality, just wondering if anyone knows that Xcode How to do this in 4 You need to add an exception to the breakpoint. Select Breakpoint Navigator, click the Add (+) button below, then select the exception block ... This should stop a debugger to stop at any time with an exception. Note that you must have the Breakpoint button enabled (notes on the right side of the plan selector in the toolbar) also, in Exact ...

c++ - Internationalization with MSWin resources (dialog/menu/strings) -

I am thinking that the approaching approach to IILN people has been found to be useful for Windows items, usually a Application through the original C ++ / WTL MSWin Resource Compiler? I have some experience, although in 2005, with a "traditional" approach to dealing with these things, speaking roughly: duplicate the resource file and send it to another language, dialogue and all Translate into My experience with this was that it is a bit painful to appreciate any positive feedback about how they were received and how they were received. I have also had some experience with GNU Gettext, which works a lot better to differentiate concerns about the developer's concerns. translator. Unfortunately, I think for the use of GNU Gettext in the windows environment, we have to sacrifice useful tools that are created in Visual Studio to create application menus and dialogs etc. Any suggestions about how this can be overcome will be appreciated. One particular concern is th...

Determine if the current user has access to the Salesforce CRM Content features via the Partner API -

Image
When using the Salesforce Partner API (version 21.0), how can I determine that the current user / session A new? I can confirm content exchanges and presently the contents of the document are available as an object for the organization. I can confirm using the current user session ContentVersion to be able to make that I have also confirmed that I am setting up the Content WRS record, to make the field (pathonclient, version Data and first published place idid). In the case of my test, if user content field passes test case through salesforce web interface ContentVersion is being created. However, when I try the same code from a developer version org (without access to the content area) it ends with the message: FIELD_INTEGRITY_EXCEPTION - User does not have access to the saleable content. Invalid field value: Origin of the content The ContentVersion Ready for Partners API metadata and fields indicate that this work should have been done. I am working on C #, but in...

php - safari/opera session cookie deleted prematurely -

I have set up a PHP session cookie with lifetime 0 (to terminate the browser shutdown), but I Logging out after a few seconds of the session. I am looking at Safari cookies popup window (Safari preferences) and when I see that the cookie only disappears from the list then only a new session ID is redirected to the login page (where A new session begins and so is the cookie set). It behaves similarly with opera. Firefox is okay but in fact I was using the site for a while without any problem in Firefox, so if I also affect it, then I have seen it so far. I have tried tooling with many HTTP headers like cache-control, checked that session_write_close () is in the right places (but in fact it should not be a difference Because I still refresh the page), I also checked the session trash clean settings, but when I saw that these cookies have disappeared automatically, then I almost got out of my socks! Mac 10.6.4 Opera 10.10 Safari 5.0.2 I should mention that an AJAX reques...

c++ - user browse web site history data -

I want to add the user to the web site link, to get all the history data where I can get those data Thank you. Well, since I'm new, I have to answer a comprehensive answer as an answer. Can do for you. If your goal is to get the user's recent browsing history, you should be able to see the locations where all mainstream browsers store their history data. I am very doubtful that Dean will put such insensitive information under encryption, so it should not be very difficult. Browsers should be kept in mind that include sea explorers like Internet Explorer, Firefox, Opera, Chrome, Netscape Navigator, and all other Mozilla Spinoffs. If your goal is to establish a connection to a web server, and then download a list of the data provided by the server, there are several setups in it First of all, you need a server. You can use something like, and you can use the HTTP protocol for all data transmission or if you are feeling brave then you can alert the server of your own ...

c# - Trouble opening SQL connection to insert textbox values -

First of all, I want to say that this is the most spectacular platform I have encountered in my programming journey, and I last In all three months, Google-phishing for all help. Great support and even more and more styles #uncromancer badges Enough with flattering I am projecting practice, insurance website now , I need to get user input from the text box in the database. I've seen lots of related questions here but I'm getting an error message on my connection I have not got on any of the other posts, and I'm so ignorant that it is difficult to implement the example that does not fit actually What am i in (As a side note, my trainer specifically wants the most basic form of this code, and such a way to tell me the answer here is not much to worry about parameterizing questions for security Or to use a try hold block for exceptions, but for those signals) I have a SQL user because of a failure in starting the process for example Failed to generate a user instan...

cakephp certificate printing Image to PDF writer and replace contents -

My client has pre-printed certificates Now, we want a dynamic run-time certification printing options, which match matches matches. Is held in One option I have seen. With the help of net friends, he has generated the PDF of the scan certificate with the PDF author and has made the reader like the name, TNTNM renamed, then the date etc. to run dynamic values, etc. Although with PHP / Cake PHP, any ideas, how we can achieve the same logic with our requirement. You have to install the TCPDF, you will have to find out more. Create a template for PDF and replace your dynamic values ​​with your cake values. See the picture as a background TCPDF example [51]

Extending table columns in collection view in Plone 4 -

In the table view of the archive collection, provides the option to choose columns to appear. We are expanding the most content-type, archetypes.schemaextender with two fields: using teaser image and teaser text. Is there a sensible way to expand the list is one of the available table columns? Is there any other way to display teaser text and teaser image inside the table view in the archive? Is the argument of the table view flexible enough to support the schema expansion? You may want to take a look at. I have not made it almost enough to polish and installing it can cause you some trouble uninstalling, so first do not install it without all the support he said, it gives you more than enough rope which you use column expression Want to do Of course this is more than enough rope to hang with you.

dynamics crm - Javascript Derived Value in CRM 2011 Form Header -

There is a basic JavaScript on form load in CRM 2011 which is retrieving data from different sources (such as web services) and local forms. farm. Some are read only and only for reference, provide more information about the unit the user is working with. Rather than keeping these areas on the form, we have the capability to keep a header and footer from CRM 2011 4.0, where you can only keep readable fields that are always visible, whether you What kind of forms do navigate. These javascript-populated areas (which work in the body of the form) do not work in the title and footer, and a javascript error appears in the status bar of IE (this gives us a reasonable Can not receive the error message). Is there any success in doing this like this? Or we've stumbled into another bizarre CRM 2011 bug. If the fields are in the header, then they are not part of the actual CRM form, and can not be changed can. You must be able to create HTML and JavaScript web resources to acco...

session Handling in asp.net -

How can I delete an ASP.NET session when the user is moving away from my site? Use the global.ascx application file and session_end event. When I click the Logout button, but when I close the browser, it does not use the global file after 20 minutes. I have the & lt; SessionState mode = "InProc" timeout = "20" & gt; & Lt; / SessionState & gt; Please help me Augustine / div> Session terminates when some session will be lost after some idle time. If you want more control over sessions, you will need to use SQL Server Mode, State Server Mode, or yourself a custom one. I mean, because, for example, SQLServer mode stores sessions in a standard SQL Server table, therefore, you can implement some SQL Server jobs, or in Windows or some Windows You can schedule some work in the service, so that you can clear the session based on your needs. By the way, you should know that if you are using InProc, your sessions may be lost because the IIS...

JavaScript validation: regex to validate numbers with comma -

How do I use JavaScript regex to validate numbers like this? 1000.00 1000 I have tried (used string match Should not be): test ('2342342342sdfsdfsdf'); Function test (t) {warning (/ \ d {1,3} (, \ d {3}) * (\. \ D \ d)? | \. \ D \ d / .test (t)); } But still gives me the truth. I am not sure what you mean by valid but it can work. // console.log is used in firebug. Var isNumber = function (str) {return! IsNaN (str.toString (). Replace (/[.///, '')); } Console.log (isNumber ('1,000.00') === true); Console.log (isNumber ('10000') === true); Console.log (isNumber ('1, ooo.00') === incorrect); Console.log (isNumber ('ten') === incorrect); Console.log (isNumber ('2342342342sdfsdfsdf') === incorrect);

Schedule data transfer service in MySQL -

I have two DB servers, i. E Server 1 and Server 2 I tell every morning (9:00 am) Server2 wants to transfer data to Server2. How can we get it? Can this transfer of data be done automatically? My choice on a window machine is to create a batch file that is going to mysqldump Runs, which is best for you. This batch file can be connected to the window scheduler for automatic execution at any point in time. You can consult the page for some guidelines by the MySQL community. Now when you have a dump of your DB, then you should send it to the destination server through your script and deploy it locally (this can also be done automatically). I use the parameters of mysqldump which allow me to increase the data on the new server I use the dump That is, the community window cover around the RSINC program (if you are interested, then you should check synchronize on that page) Both final points are very fast process than copying whole DB Allow. / P>

geolocation - what kind of code google use for detecting real ip while I'm using putty as a sock proxy? -

For some reason I'm using as socks putty proxy and hide my real IP server in 99% sites But there is an interesting issue in Google websites, Google can not recognize my real IP but can detect my actual location. I'm wondering what type of code Google is using to locate the actual location. is concerned. Google your IP You see, regardless of Use cookies for

python - How to make a module accessible for all applications including GAE deployment process -

I have a python module which contains some utils that can use all of my GAE applications. I have created it myself, it's a separate folder and I sometimes want to update my code, make refactoring and more. Each application that I am creating can take usage functions from this module. Now I need to copy the module folder somewhere in an apparer and import its functions. This is a simple process, nothing fancy. When I make some updates to the module's code, I need to overwrite this module, if it has already been imported into the application. Then I just deploy the application with the GAE utility and fixes all the work. The question is whether there should not be too many copies of the module in every application, whenever I update some code in it, but keep a copy in one place and import it from there automatically? I know that I can copy the Python searches somewhere for the module. However, whenever I put it in the GAE environment, I still need to copy this module folder. ...

linux - Quit main loop maybe the thread is still running -

Hi all ~ I have a problem that is too boring at times Sometimes when I exit my program, Then some thread is running in the Linux system, after leaving the main loop it will cause the accident. Is there any way that can kill all the threads when I leave the main loop? This will greatly help you specify the library threading of your programming language and options. The usual way of controlling this type of situation (the parent is for the thread, unless the children wait until the completion of the completion) call the function given by the library Generally, join or wait . For example, pthread provides you. If you increase the processes through the fork, then you should wait or wait, to stop the parents till the child is complete - try waiting for the man or take a look. In this way you can inform your children that you are going to get out in normal ways, until they wrap and do not end, then mainly exit the main loop. Does this help? If you want to actively kill ...

java - h:dataTable has no value -

Hello, JSF h has used: Data Table - JSF DataAbple is empty, my SP return value is returned , But only the headers are seen in the browser, table values ​​do not appear in the browser. My JSP & Lt; / Ch: Aspect & gt; & Lt; H: output text value = "# {loc.sponsorID}" /> & Lt; / H: column & gt; & Lt; H: column & gt; & Lt; F: Aspect Name = "Header" & gt; & Lt; H: output text value = "sponsor name" /> & Lt; / Ch: Aspect & gt; & Lt; H: output text value = "# {loc.sponsorName}" /> & Lt; / H: column & gt; & Lt; H: column & gt; & Lt; F: Aspect Name = "Header" & gt; & Lt; H: Output Text Value = "Distributor ID" /> & Lt; / Ch: Aspect & gt; & Lt; H: output text value = "# {loc.distributorID}" /> & Lt; / H: column & gt; & Lt; H: column & gt; & Lt; F: Aspect Name = "Header" & gt; ...

LightSwitch and Expression Blend - Will they work together? -

How can I work with LightSwitch blend? I saw in some videos that you can use custom silverlight control in LS and I can naturally make them blend with them. But can the light switch in Blend be used to customize the screen of the app? It seems that LS does not use Xaml, but puts all the screens in one application. XML file that is invalid for blends No. You will never be able to customize the LightSwitch screen in Blend, because as you have seen, they remain inside the application. XML file. If you create a shell extension, you can use Blend to do the original layout, but most of the work is in C # or VB. For theme extensions, you will definitely be able to edit the theme vs. pellet resource dictionary. Can use Blend for For the creation of a variety of LightSwitch extensions, see this link for a guidebook: There is also a Visual Studio project template available for Beta 2.

.htaccess - htaccess redirect - allow files for construction page -

I have tried to set up an htaccess archive for all except me, it works fine ... except it That I have to write an exception for every file that wants the page under construction. This will take me some time and I'm sure there is a proper way to do this, I can not find it. I have tried this: reject the order, allow all permissions of 205.97.194.334 to deny the error document 403 http://www.domain.com /page.htm & lt; Files Page HTM & gt; All & lt; / Files & gt; but I get an internal server error What I have now: Rewrite the rewriting engine / Rewrite angle %% REMOTE_HOST}! ^ 127 \ .0 \ .0 \ .1 rewrite angle% {REQUEST_URI}! / Mypage \ .html $ rewrite rule * What can I add to allow everyone to create / build / http://www.domain.com/construct/mypage.html [R = 302, L] Can i # Thankyou Can anyone tell me why the first attempt does not work? Edit: OK I added it, which allowed files, however, it is only redirected when the directory has been enter...

javascript - How can I stop event propagation with Backbone.js? -

Using a backbone.js view, I want to include the following events: Events: When I click on a link, open the panel How can I remove it? What I want is a clickable box that will trigger an action, but this box can contain elements that trigger other tasks, and not a parent action. Think for example Twitter.com, and links in the Tweets / right hand panel. I am using e.stopImmediatePropagation (); To keep the program publicity, I want to do that was a small way to do this. I should return false; But this is due to being familiar with jQuery.

html - Registered Mark does not appear when using @Page.Title! -

I'm using WebMetrics (I like it) for a new site (well, it just There is a new version of an existing site) and I have it: _SiteLayout.cshtml: @ { & Lt; Title & gt; @ Page.Title & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; @RenderBody () & lt; / Body & gt; & Lt; / Html & gt; } and ... Default.cshtml: @ {layout = "~ / _SiteLayout.cshtml"; Page. Title = "Seycidomman manager and win;"; } & Lt; P & gt; Etc. & lt; / P & gt; The page's title should look like this: Secularism Manager® However, it is not. Instead, you can actually enter & amp; Reg; In the title, you can see it only when I use @ Page.Title . Why? And how do I fix it? I do not know "webmatics", but it clearly shows the HTML encoded values ​​included in the output Before, so that the developer (you do not need) is the right behavior for the web framework. So if you type the title ...

ruby on rails 3 - Running into problem with implementing highlighting current link rendered -

The following is set up in my rail app to highlight my current rail link. & lt; Div class = "env-alt rtl" & gt; & Lt;% = section_link ("Home" ,: Admin = & gt; 'Welcome')%> | & Lt;% If user_signed_in? & Gt%; & Lt;% = section_link ("map" ,: admin = & gt; 'poin')%> | & Lt;% = section_link ("news",: admin => gt; news', ref = & gt; 'home')%> | & Lt;% = section_link ("document",: admin = & gt; 'document',: ref = & gt; 'home')%> | & Lt;% = section_link ("Organization" ,: Administrator = & gt; 'Organization' ,: ref = & gt; 'Home')% & gt; | & Lt;% = section_link ("Dashboard" ,: Admin = & gt; 'Welcome' ,: Action = & gt; 'Dashboard')% & gt; | & Lt;% # = link_to "Sign out", destroy_user_session_path ,: id = & gt; 'Sign-out'%...

iphone - Xcode 4 failure to symbolicate Crash Log -

Image
I just updated my encoded in 4.0.1. Now I have a problem with the crash log from my tester and my phone also has problems. When I make the ADACHE distribution I am using the "Eighth" scheme, then I have my developer Can I create a singing * .ipa file with credentials? Is this a problem? And I can not find dSym files for these AdHoc creation For further cob answer, I think the ignore list of Spotlight (System Preferences → Spotlight → Privacy ): ~ / Library / Developer / Xcode / DerivedData / (Xcode 4 creation artifacts) ~ / library / app support / iPhone simulator / (file system for iPhone simulator) like this: to suppress the .app file (see for additional details.) Update : From a comment:" This works But it also meant that Instruments.app could not find debug symbols, so I had to remove DerivedData for some profiling. Privacy list. - Keep this in mind if you use Instruments.

Integrating tomcat to siteminder -

Is there a detailed guide to using Siteminder with Tomke. I searched on Google and therefore most questions are The answer was not answered Here a direct link to download the Tomcat and XBase application server agents with PDF is. Or you can search for "Tomcat for CA Sitemander Apache Server Server Agent" on their support site. -and- Here is an open source implementation, however, it appears to be based on the filter and does not contain valves which it probably should be. You can write your own Jaya Provider. I have done this before and it is not very difficult. (See) I have also written a custom valve implementation to integrate with a custom SSO system, this is not straightforward and I had problems with Geronimo with class loading.

Is it possible to find usage of java classes or methods in VIM? -

Or should not use vim for such targets? with abundant segue for that purpose vim should use the integration of this Java handles quite well. For example see this.

Where should I store data about the server in a Flex app? -

I am a flex newbie and I am developing a flex application that needs to talk to the AMF server so that it The user can be certified. Where should I store the server URL? I do not want to hardcode it into the source code, but the URL should be fixed when compiling time, because when I compile the app it should be tied to a specific server. If you need a URL on time compilation but you do not want to "hardcode" it, then The best part is to store it. They work on C / C ++ as #IFDEF or #define and you can change the URL without changing the application (just re-compiling it) . You must add something like this to your compiler options: -define + = APP :: amfServerUrl, 'http: // localhost / some / path /' And then, on your app code: Private static conform AMF_SERVER_URL: string = APP: amfServerUrl;

c# - Passing DataContext to a User Control -

I have a page with a dataset: secure zero page_load (object sender , EventErgues e) {MyDifedDataContactsMyDataConnect = New MyDIFIEDDataContact (); } I want to pass this datacentext through user control: & lt;% @ Page language = "C #" MasterPageFile = "~ / Site 2. Mister" Inheritance = "WebApplication 3. Default"%> & Lt;% @ Register src = "inc / tabular.ascx" tag name = "tabular" tagprofix = "test"%> & Lt; ASP: Content ID = "Content1" content playholder ID = "contenthallsholder 1" runat = "server" & gt; & Lt; Trial: Tabular ID = "Tabular article" runat = "server" current page = "3" title = "article" /> & Lt; / ASP: Content & gt; How can I do this? Can I do this in page_load of any user control? Protected Zero Page_load (Object Sender, EventEurge E) {myCtx = mydatacont; This.setPreInfo (); This.getTableI...

Javascript explain this code please -

मैं इस पद्धति की बहुत सारी स्क्रिप्ट देखता हूं (function () {}) (); यह क्या है और इसका उपयोग क्यों किया जाता है? इसका उपयोग किया जाता है स्थानीय क्षेत्र के निर्माण को मजबूर करने के लिए यह घोषणाओं के साथ वर्तमान (अक्सर वैश्विक) गुंजाइश को नियंत्रित करने से बचता है। अगर आप अनाम फ़ंक्शन से बचना चाहते हैं, तो इसे इस तरह से लिखा जा सकता है: var गुंजाइश = समारोह () {/*...*/}; गुंजाइश (); लेकिन गुमनाम फ़ंक्शन सिंटैक्स का लाभ यह है कि माता-पिता या वैश्विक दायरे का फ़ंक्शन के नाम से भी विनम्र नहीं है। (function ( ) {/*...*/}) (); जावास्क्रिप्ट में छिपने वाली जानकारी को लागू करने का यह एक अच्छा तरीका है कि इस दायरे में घोषणाएं (फ़ंक्शन और वेरिएबल) बाहर से दिखाई नहीं देंगी लेकिन वे अभी भी एक दूसरे को देख सकते हैं और जावास्क्रिप्ट कार्यान्वयन के रूप में इस तरह के दायरे में घोषित फ़ंक्शंस को एक ही दायरे में अन्य घोषणाओं तक पहुंच प्राप्त होगी।

wsdl - Axis2 problems with Inheritence -

We have an object inheritance in our Java classes and we are returning base classes in operations. On running Java 2 WSDL, we found that only the base class object has been created in WSDL and the derivative classes have been completely ignored. There was no straight-forward way to handle this, so we used the "Additional Classes" option in Java 2 WSDL and the classes were going on, so now WSDL looks completely. When the client uses WSDL (above), then it can obtain derivative classes, but when it passes through the service, the service does not prompt this derivative class, but the example Always instantiates the base class, although the soap message contains reference to the derived class. The notice I give here seems like it does not remember those dams in the service. How can I fix this problem? Any help would be greatly appreciated. I am not clearly a supporter with Axis, but what you try to achieve looks quite like this item. Docs: In addition, you should tell...

php - Web application admin generators -

Because I found this type of device really useful for prototype applications, show customers something very quickly. For now Symfony2 , the administrator is not a generator preference (see and see) looks very interesting ... What web application administrator generator (any language / technology) would you suggest (professional / opposition)? The automated admin app of the Django is excellent. Once you have written your models, it automatically creates a full-featured admin app around you, where you can create, update, and delete records. This is also extensible and customizable for whatever is required for you. Here's one. Intuitive and satisfying to work with Django (and Python) - I highly recommend that you set it up and play with it and see how well it works.

Using Capybara + Selenium, how do I select dialog box (confirm) options in the new Firefox 4? -

I have done a solid research for this issue and regret that there is nothing useful in relation to Firefox 4. This option works fine in 3.6: a = page.driver.browser.switch_to.alert if a.text == 'OK' a.dismiss else a.accept end Unfortunately, clicking on "OK" is not an option when manually pops up. I have tried various javascript options for this, as well (where one originally sent "tricks" prompt and sent it first). Thank you for your time, - I have the same problem, the only one that I have seen so far is downgrading to Firefox 3.6.x

sql server - C# SqlCommand Connection.Open() issue -

I have a C # ASP.NET web application, I am trying to populate an ASP: DropDownList to a With the column in the database table. My code: Using the system; Using System.Collections.Generic; Using System.Web; Using System.Web.UI; Using System.Web.UI.WebControls; Using System.Data; Using System.Data.SqlClient; Using System.configuration; Using System.Web.configuration; Namespace CRM2Sage {Public Partial SOPOrderEntry: System.Web.UI.Page {Secure Zero Page_load (Object Sender, EventArgs e) {Fill1 (); } Public Zero Fill1 () {SqlCommand CMD = New SqlCommand ("Select from Products", New SqlConnection (WebConfigurationManager.AppSettings ["CRM2Sage"])); //cmd.Connection.Open (); Cmd.Connection.Open (); SqlDataReader ddlValues; DdlValues ​​= cmd.ExecuteReader (); Vproduct.DataSource = ddlValues; Vproduct.DataValueField = "theName"; Vproduct.DataTextField = "theName"; Vproduct.DataBind (); Cmd.Connection.Close (); Cmd.Connection.Dispose (); }}} W...

Why are changes not allowed in Visual Studio 2010? -

Image
2008 is in the process of upgrading from VS 2010, and for the most part it is running smoothly. One problem I am running is that if I put a break in the code, and try to make changes , Then I get an error saying that she is not allowed. It's something I can not live without, so I hope it can be fixed. Otherwise I will stick with VS 2008 for a while. I do not have any add-ins, and mer The only extension is the GIT source control manager. I tried to uninstall GIT source control manager, but this did not help the problem You're probably running a release build. Switch to the debug configuration.

Pentaho Kettle sql uid -

I need to load the database from CSV. Those tables are also used by the application code, and the table primary key Is generated by the hibernate uid . How do I make these primary keys from kettle? I appreciate any help. "use random value generated" step - It can generate UUID etc.

iphone - Delete confirmation button in UITableView overlaps the content -

- (UITableViewCell *) तालिकादृश्य: (UITableView *) टीवी सेलफोरराउथइंडएपपाथ: (NSIndexPath *) indexPath {स्थिर NSString * LogCellId = @ "LogCellId"; UITableViewCell * सेल = [टीवी dequeueReusableCellWithIdentifier: LogCellId]; यूआईएलबल * लिब्स; यदि (सेल == नीला) {सेल = [[[यूआईटीबलव्यूजेल आलोक] इनट विथ स्टाइल: यूआईटीबल विजुअलसेलटाइल डीफॉल्ट रीयूज इडेन्टिफायर: लॉगकेलआईडी] ऑटोरिएज]; LblSummary = [[[UILabel alloc] initWithFrame: सीजीआरएक्टमेक (10.0, 10.0, 320.0, 30.0)] आटोरेलेज़]; LblSummary.font = [UIFont fontWithName: @ "हेलवेटिका-बोल्ड" आकार: 14]; LblSummary.tag = SUMMARY_TAG; LblSummary.lineBreakMode = UILineBreakModeTailTruncation; एलबीएल। शुभकामनाएं। मुखौटा = मुखौटा; [सेल। कॉन्टैंट देखें देखें एस्यूब्यूव्यू: एलबीएल स्यूमर]; } अन्य {lblSummary = (UILabel *) [सेल दृश्यविवरणः SUMMARY_TAG]; } LblSummary.text = [self.logList ऑब्जेक्टअटइंडेक्स: [इंडेक्सपेथ पंक्ति]]; रिटर्न सेल; } मेरे पास एक लेबल वाला एक साधारण सेल है। मैंने स्वाइप-टू-डिलीट कार्यक्षमता को जोड़ दिया...

iphone - Why does my UITableView add another section for me when I insert an entry into an exist section? -

Image
I use NSFetchedResultController and CoreData to manage my UITableView, but I have a problem. It's really confused me for two days, and I do not know how to deal with it. I use two entities (group, contact) to store my data, and in my table view, divided into contact groups, this app works fine when the app is launched, But when I add a contact, which is one of the present group, the tableview adds a new section for me. It is not what I want. I have tried two ways and hope to fix it, but ... First of all, I use the GRP relationship of contact segment because my section isolation. The result is not what I want. So I change the other, I add a new feature (GNIM) to group my contacts, I thought this is just because GRP is a relationship, so I use a feature that does not work either is. Pleeeease help me It is difficult to tell without seeing the code, but when you add a contact and save it, then you are doing some calls such as the table [self.tableView reload] for ex...

image processing - Average blur code bug -

PImage toAverageBlur (PImage sourceImg) { PImage newImg = नया PImage (sourceImg.width, sourceImg.height); फ्लोट आर 0, आर 1, आर 2, आर 3, आर 4, आर 5, आर 6, आर 7, आर 8; फ्लोट बी 0, बी 1, बी 2, बी 3, बी 4, बी 5, बी 6, बी 7, बी 8; फ्लोट जी ​​0, जी 1, जी 2, जी 3, जी 4, जी 5, जी 6, जी 7, जी 8; फ्लोट कुल; newImg.loadPixels (); (Int i = 1; i & lt; sourceImg.width-1; i ++) {के लिए (int j = 1; j & lt; sourceImg.height-1; j ++) {int pixelPosition = i * sourceImg.width + j; R1 = red (sourceImg.pixels [((i) * sourceImg.width) + (j-1)]); बी 1 = नीला (स्रोत इमेज। पिक्सेल [((i) * sourceImg.width) + (j-1)]); जी 1 = हरे (स्रोत इमग। पिक्सेल [((i) * स्रोत इमेज। वाइड) + (जे-1)]); फ्लोट sumOne = (r1 + b1 + g1) / 9; आर 2 = लाल (स्रोत इमेज। पिक्सेल [((i) * sourceImg.width) + (j + 1)]); बी 2 = नीला (स्रोत इमेज। पिक्सेल [((i) * sourceImg.width) + (j + 1)]); जी 2 = हरे (स्रोत इमग। पिक्सेल [((i) * sourceImg.width) + (जे + 1)]); Float sumTwo = (r2 + b2 + g2) / 9; आर 3 = लाल (स्रोत आईएमजी पिक्सल [((...

.net - protected keyword -

I do not understand the protected access modifier By reading MSDN, it seems that I have class A Declare Protected Property in Class B has to pass class A and then use the property. My problem occurs when I can not enter class BI in a safe way. Psuedo code below class {{protected} steve {get; Set}} class B: a {} console app private foo = new class B (); Foo.steve = 3; I think this code will not be compiled, I see the principle that I can not use Steve from the immediate version of B. Thanks a lot for your help. protected members can be accessed within the derived classes, but others For, it is such as private this means: You can add one or b or any other derivative type of member Steve . But you can not access Steve from the outside.

php - Redirect with $_POST variable -

How can I redirect to a page and add some information to the $ _POST variable? I know that with the variable $ _GET, you get the URL as & amp; Var = foo session_start (); $ _SESSION = $ _POST; Then your post parameters will be available through $ _SESSION.

java - What Exception to use to detect host/reciever has gone down/failed? -

I have created a TCP server-client application in Java that exchanges periodic messages between them. As part of the failure management, I have to find out the host / client's failure and then call my custom function. Which exception in Java will only catch this part? Will socket expansion work here? I want to call failure management when the host / client goes down and not on any other issue. You need to differentiate between servers (resulting in shutdown, as a result) The server is not available when the connection is started, and the server is going offline (a network cable is being removed). It usually appears with one or the same. I will run a process and try to try all the scenarios that you want to handle. You have to deal with different timeouts for clear disconnection etc.

iphone - Displaying a YUV formatted video stream in iOS -

I am writing an iOS application that receives live video streams from analog security cameras. I can get the video stream from our server application and decode it on the phone in its ownership format. Decoder leaves me with raw YUV (Y'CrCb technically) data I do not really know how to display this information (or even how) is the best way. I have read that I should manually convert to RGB and show something like a UIImageView, but it seems quite possible that the video stream can be up to 30 fps, whenever the crooks I have also read to use OpenGL with YUV information to create and display 2G textures. Unfortunately I do not know where it is being started with and I'm not sure that this is the direction that I want to chase. So my question to all of you is: What is the best way to display this information on iOS device? Second, if there is some requirement like OpenGL, then anybody can suggest a good tutorial, book, code sampling or any other learning resource so that...