Posts

Showing posts from June, 2011

sql server - Using Com+ (VBScript) Function in a SQL Function -

I usually code used to encode a string using a DLL Com + Component / Object and I'm wondering how and if something write me know how SQL works, but cOM + library can not be inserted objects, can it be accomplished? In Set the way I write code in the code: sMyKey = "1234567" sStr = "encoded to the text" Crypt = server. CreateObject ( "aspCrypt.EasyCRYPT") Crypt.Algorithm = 162 Crypt.Mode = CmCTS Crypt.Counter (-1) Crypt.initKey (sMyKey) sEncodedString = Crypt.EncodeString (Sstiar, 1) not set Crypt = a the sEncodedString gives me how to write a SQL function this code? Well, shows a bit of googling that Sp_OACreate . View

jQuery: How to automatically recall a loop function after it ends? -

तो यहां मेरा कोड है: फ़ंक्शन ड्रॉ () {var लंबाई = 50; (I = 0; i & lt; लंबाई; i ++) {var entity2 = $ ("& lt; div वर्ग = 'ab' id = 'infinite" + i + "' & gt; & lt; / div & gt;"); // & # 8734 entity2.html (पी [i]); Entity2.css ({'left': window.innerWidth / length * (i), 'top': pi [i] * window.innerHeight / 20 + window.innerHeight / 2, 'स्थिति': 'पूर्ण', 'रंग ': रंग [अनुकरणीय [i]]}); । $ ( 'शरीर') (ENTITY2) संलग्न; } के लिए (i = 0; i & lt; लंबाई; i ++) {for (a = i; a & lt; लंबाई; a ++) {$ ('# infinite' + i) .animate ({'top': pi [a] * खिड़की .innerHeight / 20 + खिड़की। विजेताउच्च / 2 + 'पीएक्स', 'रंग': रंग [पीआई [ए]]}); }}; }; लूप समाप्त होने पर एनीमेशन बंद हो जाता है इसे बंद होने के बाद मैं इसे फिर से पुनः आरंभ कैसे कर सकता / सकती हूं? धन्यवाद। एक सेटटाइमआउट जोड़ें के लिए (i = 0; I & lt; लंबाई; i ++) {for (a = i; a & lt...

oracle - Transpose and insert multiple rows with differing values -

I have another complex version of the following table: id | First of all. Last | EMAIL 1 | John | Do | | Jdoe@example.com 1 | Mac | Johnson | Mjohnson@example.com 1 | Steven | Michaels | Smichaels@example.com 2 | Sara | Sampson | Ssampson@example.com 2 | Tom | Smith | Tsmith@example.com 2 | Jane | Rogers | Jrogers@example.com 3 | Bob | Johns | Bjohns@example.com 3 | Kim | Lane | Klane@example.com 3 | Ron | Swanson | Rswanson@example.com and I would like to write a query that inserts this data to appear in another table like this (table already exists): id | First 1 Last 1 Email 1 | First 2 Last 2 Email 2 | First 3 Last 3 Email 3 1 John | Do | | Jdoe@example.com | Mac | Johnson | Mjohnson@example.com | Steven | Michaels | Smichaels@example.com 2 | Sara | Sampson | Ssampson@example.com | Tom | Smith | Tsmith@example.com | Jane | Rogers | Jrogers@example.com 3 | Bob | Johns | Bjohns@example.com | Kim | Lane | Klane@example.com | Ron | Swanson | Rswanson@example.com I think...

custom 301 redirects from old joomla (mambo) website to new drupal 7 website using .htaccess -

In the last few hours I am trying to create a custom redirect from an old mambo website that is new drupal with .htaccess 7 is on the website. The file that is present in my Drupal root What do I want to do ... 301 redirection This is my .htaccess file ... Reviving On On Rule Rule ^ index.php? Option = com_content and task = blogsection and id = 11 & itemid = 54 $ http://mysite.com/this- is-the-new-page [R = 301, L] rewriter "(^ | /) \." - [F] Rewind Conduit% {HTTP_HOST} ^ www. (. +) $ [NC] rear array ^ http: //% 1% {REQUEST_URI} [L, R = 301] Rev.% {REQUEST_FILENAME}! -The revival code% {REQUEST_FILENAME}! -d Recovery code% {REQUEST_URI}! = / Favicon.ico rewrite rule ^ index.php [l] I'm sure that this line has something to do .. .. revised rule ^ index.php [L] But I do not get it! If you use it you can see ... rewrite rule ^ option = com_content and task = blogsection and id = 11 & itemid = 54 $ http://mysite.com / This-is-the instead ....

c# - Object reference not set to an instance of an object - Black Jack Game -

I'm a bit of a programming novice and I'm making a black jack game, but I'm really struggling when I get this message from the hit function, then add one card to the player's hand with my fired deck, object. I know that the solution really is really clear, but can you please help? The problem is below deck class hit () function / * main square * / Using the system; Using System.Collections.Generic; Using System.Text; Namespace BlackJackGameX {public class main class {public static zero main (string [] arg) {deck card = new deck (); Hand player hand = new hand (card); Console WrightLine ("Welcome to Black Jack \ n \ nPress Enter to get started"); Console Readline (); Cards.Hit (); PlayerHand.PrintHand (); }}} / * Card class * / using the system; Using System.Collections.Generic; Using System.Text; Namespace Black Jack GameX {Public Swan, Hearts, Clubs, Diamonds} Public Face (Ace, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, J...

c++ - How to solve "boost::bad_any_cast: failed conversion using boost::any_cast" when using boost program options? -

// Use the Boost Program option to read command line and configured file data #include & lt; Boost / program_options.hpp and gt; using namespace std; Using Namespace Boost; Name space po = boost :: program_options; Int main (int argc, char * argv []) {po :: options_description config ("configuration"); Config.add_options () ("IPAddress, i", "IP Address") ("Port, P", "Port"); Po :: variables_map vm; Po :: store (po :: parse_command_line (argc, argv, config), vm); Po :: Notify (VM); Cout & lt; & Lt; "Value \ n"; String Address = (VM ["IP Address"]. & Lt; std :: string & gt; ()). C_str (); String port = (VM ["port"]. As & lt; std: string & gt; ()). C_str (); Cout & lt; & Lt; (Vm ["IPAddress"]. & Lt; string & gt; ()). C_str (); Cout & lt; & Lt; "" & Lt; & Lt; (VM ["Port"] & lt;; string & gt; ()). C_str (); Ret...

html5 - HTML 5 Background is over navigation menu? -

I have started designing my portfolio and I have the problem that I set the pattern for the background, But I want and 1 more color and 1 cut image on this pattern I started giving code and everything was fine, except that my navigation menu and other things came under this color and picture which I added. This is HTML code and CSS. help please?!? & lt ;! DOCTYPE HTML & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Wrap up HTML5 & lt; / Title & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "css / style.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "top-wrap" & gt; & Lt; Div id = "cornerfill" & gt; & Lt; Div class = "fillmask" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "fillright" & gt; & Lt; Div...

python - Django-503 App Maintenance Template Error -

I have recently downloaded the app of Coagulant which generates 503 pages so that you can run maintenance I currently have problems that I downloaded the app from GitHub and had a PIP installed. I followed all the instructions though, when I try to turn on Maintenance mode, I get the following error. Request method: Post Request URL: http://XX.XXX.XXX.XXX:8000/admin/ Django_503/config / 1 / Django Version: 1.4.3 Exception Type: TemplateDoesNotExist Exception Value: admin_warning.html Exception Location: /usr/local/lib/python2.7/dist-packages/django/template/loader.py find_template, line 138 Although package from GitHub The template came with, Django can not seem to find them. Is there any possible solution for this? I came to know what the problem was, while installing a PIP, the package provided HTML files with dist- The package was not installed in the directory, where DJengo_503 remains. You must manually add a template folder to Django_503 and then add the related ...

ruby on rails - Multipule posts in loop with FbGraph gives: OAuthException :: (#1) An error occured while creating the share -

I am having trouble posting posts on the page, and only get useful error: The first 20 or so posts did great work, then started this error. Is there a limit on the number of Facebook pages can one page (spam) or something else? I can reproduce the rail c form and I have tested my access_token triple and can post directly to FB manually. Br> (I am using page access_token my user one) I opened an issue on the FBIfrape flue, but neo feels that Its an FB score My code: admin = admin.first page = FbGraph :: Page.new (admin.facebook_page_id) Story .where (: Facebook_post_id = & gt; zero) .all.each do | Story | Post = page.feed! (: Link = & gt; 'http://www.example.com/stories/'+story.cached_slug ,: access_token = & gt; admin.facebook_page_access_token) story.facebook_post_id = post.identifier story.live = true story. Sleep sleep 1 end backrace: FbGraph :: InvalidRequest: OAuthException :: (# 1) / usr An error occurred while creating a s...

Google Maps-style quad-tree of materials on a single plane in Three.js – 1x1, 2x2, 4x4 and 8x8 -

Image
I am trying to get a quad-triggering content (images) on a plane and I'm not working , The closer that a Google Maps-style zoomable tile gets, the closer it gets. In short, I want to create a 1x1 image texture (covering an aircraft that is wide and length of 256 units) which can then be replaced with 2x2 texture, then with 4x4 texture Can be changed, and similarly. Like the example image below ?? | Ideally, I I want to avoid making a separate plane for the level / number. A correct solution of the segment will allow me to break an aircraft into 8x8 segments (the highest zoom) and update the number of texture on the fly. So it will start with a 1x1 texture in all 64 (8x8) sections, then change the texture of 2x2 with each texture covering 4x4 fields, and so on. Unfortunately, how can I not do this? I searched the materialInndex setting for each face, but you have not been able to update those people who will not work after rendering first. I have tried to look for U...

php - performance issue in website based on LAMP architecture -

I have an internal website that uses LAMP architecture. My main page takes approximately 10 seconds to load data. There is not a lot of data around 4-5 records. I do not have any complicated MESQL queries, but there is a lot of them, that is, around 10-15 questions. Actually I'm removing meta-data to display on the page. These are very simple questions. I have a lot of PHP and JavaScript logic, which is of medium complexity. I can not remove any of these I have around 1800 line codes in that page and I am using data to display data. The stats contain 25 columns and many HTML selection elements. So how do I know why this page lacks performance? I tried to be as clear as possible, but please tell me if you have any questions. Appreciate your time and help.

windows runtime - Grid Splitter Overlap -

Image
I'm trying to create an "overlap" effect (for the lack of a better word). Where a splitter is taken, it displays a different view of two similar images (such as between colored and grayscale). I used a custom grid splitter with WinRTXAMLToolkit I'm planning to use (due to the lack of a splitter's VNRT). I'm thinking of starting with a grid: & lt; Grid & gt; & Lt; Grid.RowDefinitions & gt; & Lt; Roadfinition /> & Lt; RowDefinition Height = "10" /> & Lt; Roadfinition /> & Lt; /Grid.RowDefinitions> & Lt; Control: Custom grid splitter grid. Rows = "1" opacity = "0.25" /> & Lt; / Grid & gt; ... but I'm not sure how to proceed if I specify the two image controls on the first and third row (or column), then image control (either How to stop walking? Apart from this, is it possible to skew it? You can use two rectangles that use an image brush or two image ...

javascript - If confirm in js.erb -

I want something to work like this: Show.erb.js: If (Confirm ('Delete the car?')) {& Lt;% @ current_cart.reset% & gt; $ ('Cartbase'). Replace ('& lt;% = j render: partial = & gt; "layout / cartbase"%> gt; } But the ARB part of code is always growing Any ideas? Because the code and lt;% @ current_cart.reset% & gt; will be executed when ERB means. If you use AJAX: if (confirm ('delete cart?')) {$ .post ('& lt;% = reset_cart_path (@current_cart) )% & Gt; ', function () {$ (' .cartbadge '). Replacewith (' & lt;% = j render: partial = & gt; "layout / cartbase"%>;);}); }

MySQL and PHP - Get last comments from database -

मेरे पास यह कोड है: $ sql = "SELECT * DEPTMENTMENT WHERE DEPTEDID = '$ PostID' ORDER BY deptCommentRegDate एएससी, deptCommentRegTime ASC LIMIT 4 "; यह काम कर रहा है लेकिन यह केवल एक विशेष पोस्ट की पहली 4 टिप्पणियों को प्राप्त करता है। एएससी आदेश में अंतिम 4 टिप्पणियाँ पाने के लिए मुझे इस कोड की आवश्यकता है। क्या यह संभव है। किसी भी मदद की सराहना की। कोशिश करें $ sql = "SELECT * FROM DEPTMENTMENT WHERE DEPPITID = '$ POSTID' ORDER BY DEPTMENTMENTRegDate एएससी, DEPTMENTRegTime DESC LIMIT 4"; ... और उसके बाद array_reverse (); परिणाम पर चलाते हैं। जब भी मुझे आपके पास है, तो मुझे लगता है कि आप अपनी क्वेरी इस तरह से तैयार कर रहे हैं कि यह सुझाव देता है कि आप उसे mysql _ * प्रकार फ़ंक्शन पर पास करने का इरादा रखते हैं। कृपया ध्यान रखें कि इन प्रकार के कार्यों को नापसंद किया गया है, और आपको सलाह दी जाती है कि पुस्तकालय जैसे को इसके बजाय डेटाबेस से संवाद करने के लिए।

delphi - TWebResponse is not parsing my posted files -

I have a simple datasnap REST server, on TWebModule, I wrote a post request "upload / document" on the path. On the Action Event I have this code: Process TWebModule.WebModulePostFileAction (Sender: Tubect; ​​Request: Twib Request; Response: Twib Response; var Handleld: Boolean); Var i: integer; Str: string; I: Start for: 0 to request.Files. Start Count 1: Str: = Str + ',' + Request. Files Item [i] .FileName; // I would like to save or transfer the uploaded file like c: \ myFiles \ End; reaction. Content: = Str; End; Request.Files.Count is always 0, but when I inspect Request.content object, I can see multipart file content. How can I get the posted file from the request? And in the disc where there is something left. My HTML form from which I look like a posting: & lt; Form action = "/ upload_file" method = "POST" enctype = "multipartile / form-data" & gt; Note: & lt; Input type = "text" name = "n...

mutex - Fast triangulation in PCL -

I want to make point cloud triangle after applying passstra filter to them. It's compiled but the viewer does not show anything. Here is my source code: #include & lt; Boost / thread / thread.hpp & gt; # Include & lt; Boost / date_time / posix_time / posix_time.hpp & gt; # Include & lt; Pcl / point_cloud.h & gt; # Include & lt; Pcl / point_types.h & gt; # Include & lt; Pcl / io / openni_grabber.h & gt; # Include & lt; Pcl / io / pcd_io.h & gt; # Include & lt; Pcl / io / openni_camera / openni_driver.h & gt; # Include & lt; Pcl / surface / organized_fast_mesh.h & gt; # Include & lt; Pcl / console / parse.h & gt; # Include & lt; Pcl / general / time.h & gt; # Include & lt; Pcl / console / time.h & gt; # Include & lt; PCL / Visualization / Cloud_view H & gt; # Include & lt; Pcl / filter / passthrough.h & gt; Using Namespace PCL; Namespace PCL :: Using Visualization; using n...

c# - Is there a way to keep a png/jpg image from being converted to a bitmap image -

I am creating a C # / WPF / Windows 8 App Store app and I try to load some PNG / JPG Images to display to see them are all highly high resolution, but the size of the file is usually only around 200k or the problem is that when I get them a bitmap image class (which can only be found one ), The total used to be used Memory increases to 100 S mega. What I can tell, it takes png / jpb and converts it to a bitmap image, which extends memory usage to a large extent. Am I missing something? My code is down, so far I have not found any way around it, though it seems that there should be a simple solution. Private async Task Test Function (IRD ONLY LIST & lt; StorageFile & gt; Files) {var images = new ObservableCollection & lt; Image & gt; (); ImagePanel.ItemsSource = coverImages; Foreign files (files) {var bitmap = new bitmap image (); Var item = await file.OpenAsync (FileAccessMode.Read); Bitmap.SetSource (item); Var image = new image (); Image.Source = bitmap; I...

Cannot INSERT data into mysql using php -

I'm trying two days to figure out this. I have literally copied from a tutorial and I still can not insert data into a table. Here is my code with the form Customer type & lt; Font face = "wordana" & gt; & Lt; Choose name = "cut type" size = "1" & gt; & Lt; Options & gt; Non contract & lt; / Options & gt; & Lt; Options & gt; Contract & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Font & gt; & Lt; Br> Contract Time & lt; Font face = "wordana" & gt; & Lt; Input type = "text" name = "contract hoard" value = "0" & ​​gt; & Lt; / Font & gt; & Lt; Br> & Lt; Font face = "wordana" & gt; & Lt; Input type = "submit" name = "hasis" value = "add customer" & gt; & Lt; / Font & gt; & Lt; / Form & gt; & Lt; / Font & gt; & Lt; Font fac...

mysql - Single select statement error "Every derived table must have its own alias" -

I am trying to get the following selection statement to work for a few days, but I could not find any luck is. A quick summary of the code is that it gives a list of all the teams in the database and how many wins are recorded with the teams ranked in the top 10 in each team. The winning table is drawn from the game table in which every game is played. Here is the code I IF (@last_ranking> but I am receiving the following error Error code: 1248. Each derived table should have its own name Can anyone see what I'm doing wrong here? Thanks! You probably miss to add a nickname due to the alignment of your SELECT Is statement Select if (@last_ranking

php - How do I process a as a form -

मैंने जो किया है वह है: HTML & lt ; प्रपत्र & gt; & Lt; div id = "textbox" contenteditable = "true" name = "textbox" & gt; & lt;? Php गूंज $ storyText; ? & Gt; & Lt; / div & gt; & Lt; textarea id = "छिपी हुई" नाम = "छिपी हुई इनपुट" & gt; & lt; / textarea & gt; & Lt; इनपुट प्रकार = "सबमिट करें" id = "save" name = "save" value = "सबमिट करें" / & gt; & Lt; / प्रपत्र & gt; जावास्क्रिप्ट $ ('# save')। क्लिक करें (फ़ंक्शन () {var mysave = $ ('# textbox')। Html () ; $ ('# छिपा हुआ इनपुट')। Val (माइस्वेव); $ ("फ़ॉर्म: प्रथम")। सबमिट करें (); $ ('# छिपा हुआ इनपुट')। अनुलग्नक (माइस्वेव); अलर्ट ($ ('# छिपाएंडपुट')। Val ());}); इसलिए दोनों सतर्क और अनुलग्नक सही जानकारी प्रदर्शित करते हैं, लेकिन जब यह सबमिट किया जाता है तो # hiddeninput को एक PHP चर के रूप में नहीं बचाया जाएगा। मू...

javascript - adding data to DOM -

As far as I have seen, no one has specifically addressed this method due to the document. GetElementsByClassName I am calling, but I can not understand why this will not work. Here's the intent to add the value (string) to the page. I have identified an existing device named after class and just added a text node, after which the data item, "account name:" should be displayed. Obviously there is something wrong with my syntax or argument but I can not see it. Can someone shed some light on me? this.updateUname = function () {var NewNode [0] = getElementsByClassName ('ACC'); Var div = document.createTextNode ('div'); Div.innerHTML = "Account name:"; NewNode.appendChild (div); } Thanks, Ajfbiz in advance Change: var newNode [0] = getElementsByClassName ('ACC'); to var newNode = document.getElementsByClassName ('ACC') [0]; Here's a bella:

c++ - with Pathfinding Algorithm

I am working on a project which, at least, will generate 2D matrix of numbers, "empty" space With each number submitted by 0 is linked to the list of nodes. Due to the algorithm, there is a list of number values ​​in the nodes, the position of the number of x and y, and all the locations around it (its "neighbors"), which occurs with the exception of the quartz space near the point, Only allows fault, bottom, left and right I have the issue that, as the title suggests, I have some stack overflow problems. I will post my code below, if any I can help, so I appreciate most. CoordiaList * Puzzle :: GeneratePath (Coordist's List * Path, Int Gooylx, It Goyal) {int quarks; Int'l Currie; CurrX = path- & gt; Neighbors; CurrY = path-> Neighbors; If (currx == golfes and curie == round) {return (path); } Else {int NewX; Int NewY; Double new distance; Int Oldx; Int Old; Double Priorism; CoordList * PointNeighbors = NULL; CoordList * Best Choice = Faucet; F...

mysql - Left/Right Join with reference to another table -

I'm trying to reach three tables to do something like this: + - ----- + ------ + ------ + | Items | PCS | CSS | + ------ + ------ + ------ + | 10 99 | 2 | 11 | | 10 9 8. 2 | 2 | | 10 9 7. 2 | 1 | | 10 9 6. Faucet Faucet | 10 9 5. Faucet Faucet | 10 9 4. Faucet Faucet | 10 9 3. Faucet Faucet | 10 9 2. Faucet Faucet + ------ + ------ + ------ + But, I get all this: + ------ + ------ + ------ + | Items | PCS | CSS | + ------ + ------ + ------ + | 10 99 | 2 | 11 | | 10 9 8. 2 | 2 | | 10 9 7. 2 | 1 | + ------ + ------ + ------ + // I'm confused with my query, so here's a breakdown Instead of what I am trying to do: SET2 WHERE MO = MONTH (SYSDATE ()) and YR = YEAR (SYSDATE ()) // Select the code and then: SELECT ITEM , Select items from SET3 WHERE S3.CODE = S2.CODE // again: SET1 WHERE S1 by PCS, CSS. ITEM = S3.ITEM My table SET1 + ------ + | Items | + ------ + | 10 99 | | 10 9 8. | 10 9 7. | 10 9 6. | 10 9 5. | 10 9 4. | 10 9 3. | 10 9 2. + ------ + ...

android - APK expansion file expPath does not exists -

Image
I am trying to change my app to use the APK extension file and for any reason given below The path can not be detected in the code passed. My APK Expansion Files ... static String [] getAPKExpansionFiles (Context ctx, int mainVersion, integer patchVersion) {Log.v (TAG, "Utils.getAPKExpansionFiles [27] mainVersion the" + Main version + "patch warsen =" + patch warsen); String packagename = ctx.getPackageName (); Logs. V (TAG, "Utils.getAPKExpensionFiles [27] package name [+ + + packagename +"] "); New vector of vector & lt; string & gt; (); if (. Environment.getExternalStorageState () equals (Environment.MEDIA_MOUNTED)) {Log.v (TAG, "Utils.getAPKExpansionFiles [32] MEDIA_MOUNTED"); // app to create the full path to expansion files file root = environmental .getExternalStorageDirectory (); log . V (tAG, "Utils.getAPKExensionFiles [35] root =" + root); Akspepath file = new file (Rutkstosting () + EXP_PATH + packageName...

big o - Is there any algorithm which take O(1) time? -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब मैं एल्गोरिथम के लिए देख रहा हूँ ओ (1) दोनों खोज और प्रविष्टि के लिए समय ले । क्या कोई एल्गोरिथ्म उपलब्ध है? क्या यह संभव है? आप सैद्धांतिक रूप से एक ओ (1) डालें और एक हैश मैप के लिए खोज कर सकते हैं, मान लेना हैश सही है, और हैश की गणना करने का समय ओ (1) है।

ios - issue when multiple recipients for my app mail- Objective c -

I am facing a problem when multiple recipients for my mail, I have two attachments by default Are there. When IAM sends mail to many recipients other than the code given below; (I have to select or have to type the recipient ID from the UI) if ([Membel Comcast WeekCentor can SendMail]) {[Self Print PDF and Csv]; // code pdf & amp; CSV MFMailComposeViewController * MailComposer = [[MFMail Composive Vicentrador Alloc] INIT]; MailComposer.mailComposeDelegate = self; // attached pdf file. [MailCampersAd AttachmentData: [NSData Datavide Contentoff file: Self. PDF File Path] Emmy Type: @ "Application / PDF" filename: [nssting stringvat format: @ "pdfnm -% @ pdf", selected projectname]]; // Attach CSV file [MailComputerAd AttachmentData: [NSDATA DATAVITY CONTENTOFFFILE: Self. CSF file path] Emmei type: @ "Text / CSV" filename: [NSSTING stringvat format: @ "CSVNum -% @ CSV", Selected ProjectName]]; [Self-present ViewController: animated mailCo...

asp.net mvc 3 - Required Validation Error Message is not getting displayed in jquery popup modal form -

I used the ComponentModel.DataAnnotations attribute for the verification code [Required] attribute. Although the form is not appearing in, regular expans verification and range validation are working fine. In one of my fields, I have used both [essential] and [regular expression] when I input incorrect input in the text box, then the RegualExpression verification message appears and after deleting the input, Only required verification message Otherwise, the required verification message does not appear. Here's my code: - Model class public class email {[required (error message) = "email address is required!" )] [Regular expression ("^ ([a-zA-Z0- 9_ \\ - \\.] +) @ ((\ \ [[0- 9] {1,3} \ \ [0-9] ] {1,3} \\. [0- 9] {1,3} \\.) | (([A-zA-Z0-9 \\ -] + \\.) +)) ([A- ZA-Z] {2,4} | [0- 9] {1,3}) (\\]?) $ ", Error message =" invalid email address. ")] {Receive public virtual string email address; Set; } [Required (AllowEmptyStrings = false, ErrorMe...

Python 3.3: Catching HTTPError with Timer -

I'm trying to study Python and I want to try to capture a server time out (if my internet connection is interrupted or something else) and by adding a timer that will stop the process for x seconds (below) Code is 2 seconds) then try to continue the process though I believe my argument is correct (please correct me if I am wrong), I get an error Thread Thread-1: Traceback (most recent call final): "C: \ Python33 \ lib \ threading.py", in line 639, _bootstrap_inner .run () file "C: \ Python33 \ lib \ threading.py", line 825, run self.function (* auto.rgs, ** self.kwargs) TypeError: 'any type' object is not worth the corner I do not understand why my timer triggers and error is my code: import urllib.request timer with import threading REQ = urllib.request.Request ('http: //www.nowebsitec Ontainsthisaddress.com ') def servertimeout (e): timer_rest = timer (2.0, print (' timeout error: ')) timer_st. Start () print (E.Reson) while timer...

windows phone 8 - Get the AccessToken of Facebook without login using HttpWebRequest for WP8 -

मैं इस तरह से accesstoken पाने के लिए कोशिश कर रहा हूँ, string uri = "https: //graph.facebook.com/oauth/access_token?client_id= "+ APP_ID +" और amp; redirect_uri = & amp; client_secret = "+ APP_SECRET +" और अनुदान_प्रकार = client_credentials "; Var access_token = GetMyData (यूरी); सार्वजनिक async टास्क & lt; स्ट्रिंग & gt; GetMyData (स्ट्रिंग urlToCall) {HttpWebRequest अनुरोध = (HttpWebRequest) WebRequest.Create (urlToCall); अनुरोध। विधि = "प्राप्त"; HttpWebResponse प्रतिक्रिया = (HttpWebResponse) अनुरोध का इंतजार कर रहा है। GetResponseAsync (); (Var sr = नया स्ट्रीमरिडर (प्रतिक्रिया। गेटरस्पॉन्सस्ट्रीम ()) का उपयोग करते हुए () sr.ReadToEnd (); }} सार्वजनिक स्थैतिक कार्य & lt; एचटीटीपी वेब रिस्पांस & gt; GetResponseAsync (यह HttpWebRequest अनुरोध) {var taskComplete = नया कार्य समाप्ती स्रोत & lt; HttpWebResponse & gt; (); request.BeginGetResponse (asyncResponse = & gt; {try {HttpWebRequest responseRequest = ...

php - INSERT INTO called once but runs twice (not in a loop) -

I have a query that appears every time, it is run twice, which is not intended to be done before and after The logging in the file is added and the file is cleaned before running the script. I do not think I have to post another code because I believe my logging proves that this query is only called once. code: file_put_contents ($ _SERVER ['DOCUMENT_ROOT']. '/ PDOErrors.txt', "\ n \ n 1 query immediately before the ban." Date ('r'). "(1)", FILE_APPEND); $ Sth = $ mdbh- & gt; Query ("INSERT INTO banned_IP SET ip_add = '$ ip', proxy_ip = '$ proxy_ip'"); $ Sth- & gt; Executed (); File_put_contents ($ _SERVER ['DOCUMENT_ROOT']. '/ PDOErrors.txt', "\ n \ n User banned using query 1." .date ('r'). "(2)", FILE_APPEND) ; Return 999; Note that immediately after its running immediately there is a return and even if it is called twice, then my PDOErrors The ....

iphone - Connection Lost error while using NSURLConnection -

I am experiencing a problem while losing the connection while using NSURLConnection. I am using NSURL connection for asynch download. I am downloading a large file size of around 80 MB, I am writing the data received every time in the file with proper file handling. After some time I am getting a connection error "Lost Connection" in the method of NSURLConnection Representative DidFailWithError If I execute the simulator on Mac then it will take a lot of time, but any suggestions that successfully downloaded the file without connection lost error How to avoid this error? Or what is the reason behind this error? Let me know if any details are necessary. Please note that I have read this type of post but it has not been able to help me. Below the code snippet and tell me if more information is needed: - (zero) startdownloadfromURL: (NSString *) URLString {if (URLString == zero) {[delegate DownloadFailed: -1]; Return; } //self.pstrBaseFilePath = filePath; URL strin...

activity manager - How can I determine permission of Running apps programmatically in android? -

I want to see permission to run android apps in my software. For this reason, I have the following code: list & lt; App & gt; Apps = New Arrestist & lt; App & gt; (); ActivityManager am = (ActivityManager) this.getSystemService (ACTIVITY_SERVICE); PackageManager packageManager = getPackageManager (); & Lt; RunningAppProcessInfo & gt; L = am.getRunningAppProcesses (); Iterator & LT; RunningAppProcessInfo & gt; I = L. Knitter (); PackageManager pm = this.getPackageManager (); Int row_count = 0; While (i.hasNext ()) {ActivityManager.RunningAppProcessInfo info = (ActivityManager.RunningAppProcessInfo) (i.next ()); Try {CharSequence c = pm.getApplicationLabel (pm.getApplicationInfo (info.processName, PackageManager.GET_META_DATA)); App app = new app (); App.setTitle (c.toString ()); App.setPackageName (l.get (ROW_COUNT) .processName); PackageInfo packageInfo = packageManager.getPackageInfo (l.get (line_ count) .processName, PackageManager.GET_PERMISS...

javascript - all data of jqgrid in array with xmldata -

class = "post-text" itemprop = "text"> " xmldata jqgrid in an array How to get the data?> "? I know how to get the data using the " local " data, so I get it with var local gridata = $ ("#list") Tried. JqGrid ('getGridParam', 'info'); but it is not working for xmldata . So can anyone please suggest me how xmldata . If you type or datatype: " The internal parameter data will not be filled in and then you will be $ ("# list" ) Can not be used JqGrid ('getGridParam', 'Data') . If you can use getRowData without additional parameters.

c# - asp.net auto parse -

मेरे पास मेरी वेबसाइट में एक कोड है & lt; link href = "& lt;% = ResourceUrl% & gt; प्वाइंटमॉल / सीएसएस / jjh_style.css "rel =" स्टाइलशीट "प्रकार =" टेक्स्ट / सीएसएस "मीडिया =" स्क्रीन "/ & gt; ब्राउज़र पर परिवर्तित किया जा सकता है & lt; link href = "& amp; amp; lt;% = resourceUrl% & gt; प्वाइंटमॉल / सीएसएस / jjh_style.css? T = 1 "rel =" स्टाइलशीट "प्रकार =" टेक्स्ट / सीएसएस "मीडिया =" स्क्रीन "/ & gt; क्यों? धन्यवाद दोहरे उद्धरण चिह्नों के बजाय एकल उद्धरण का उपयोग करें उदाहरण: & lt; link href = '& lt;% = ResourceUrl + "प्वाइंटमॉल / सीएसएस / jjh_style.css"% & gt;' Rel = "स्टाइलशीट" प्रकार = "टेक्स्ट / सीएसएस" मीडिया = "स्क्रीन" / & gt;

php - Looking for open source based Multi tenant LMS (Learning management system) other than moodle -

We are searching an LMS that we can use as the basis for a new product that we are rolling out . As a matter of primarily content based, we should have everything basic on LMS, but there are some things we need to: As we are supporting tens - Hundreds of users, we ideally need a multi-tenant LMS (Single Shared Code Base), which can support different designs per site, as we are selling in functionality, we need something Which will deploy us a new 'module' and will turn it on / off. Based on the site, we prefer one thing which is open source (PHP) before I think of building something, is there anything that's good? Here are some open source LMS options: You can also see SCORM Cloud which takes away a lot of headaches to deploy the material, you only need a frontend like Wordpress or Joomla.

magento - Create product using Oauth & curl -

After Trying to create a product using Im RESTful API. RESTCLIENT achieved this functionality using Firefox addon but failed to use the script. I am able to list the products but I am not able to make the product using IM script. Anyone can help me get access denied error Here's my script $ url = 'http://magento.com/api/rest/products '? $ Method = 'POST'; # Header and data (this is the dependent API, uses some XML) $ header = array ('Accept: application / json', 'content type: application / json', 'oauth_signature_method: HMAC-SHA1', 'oauth_nonce: ilJuravy9KVYm6R '' oauth_timestamp: 1363848967 ',' oauth_consumer_key: xxx ',' oauth_consumer_secret: yyy ',' oauth_token: zzz ',' oauth_token_secret: xyz ',' oauth_signature: 4admodOkAj2pKwhO5Tk6TEjc7Rg% 3-D ',' oauth_verifier: mrr1350pp0j8hiyv31kzxhko97hyyuwx ',' oauth_version: 1.0 ',); $ Data = json_encode (array (...

haskell - Checking to see if a list is ordered consecutively -

Is there a Library function in Haskell that allows me to check whether the list is constantly sorted or not? like. [1,2,3,4] is valid, [1,2,3,10] is invalid. Actually I can have a list that is between 3 to 5 elements and I am trying to check that the list has been ordered respectively. My attempt (I'm not sure that this is a way to properly contact, it is being repetitive too) isSucc :: [integer] - & Gt; Bool isSucc [] = True Haze (X: Y: zs) = if (x + 1) == y then true & amp; After working on this function, I'm planning to use it to filter the list lists (by putting the list in) (SEC: (y: zs) only and can be recorded only when There is no standard work for this. Here is a definite version of your function, by generalizing it, removing unnecessary conditions and adding missing ones: isSucc :: (Enum a, Eq a) = & Gt; [A] - & gt; Bool isSucc is [] = True Succ (X: []) = True is the SUCC (X: Y: ZS) | Y == succ x = isSucc $ y: zs is SUCC _ = wrong ...

c# - Access to ReflectedType of PropertyInfo when unboxing from Object -

Let's assume that I have some properties built from the Confirmed Object Reflection process. Normally I could have internal objects through my reflexedtype property but if it was boxed in the object then I could not access it. var x = property.ReflectedType // works as a work work var y = (object properties) .ReflectedType // will not work How do I access the Refinanttype property of the property that was boxed for the object? If you are sure that your object reference PropertyInfo , then return to PropertyInfo and you can use the property. var z = (Property Info) y). Refacted Type Edit about your additional comment on quesion: If you still can use your property variable where you want to do this, then just use that. .. I think that you are confused about something here, but you should provide more information, because no one can help you unless you do so.

c++ - template argument deduction/substitution failed, when using std::function and std::bind -

I have a compilation error when using the std :: function in the templated member function, the following code is a simple example: / P> #include & lt; Functional & gt; #include & lt; Memory & gt; Using the Std :: function; Using std :: bind; Using Std :: shared_ptr; Class test {public: template & lt; Typename T & gt; Zero set callback (function & lt; void (T, int) & gt; cb); }; Template & lt; Typename T & gt; Zero Test :: Set Callback (Function & Lt; Zero (T, Int)> CB) {none}} Class Test A {Public: Zero Testa (Int a, Int B) {}}; Int main () {Test A Test A; test test; Test.setCallback (bind (and test a :: testa, and test a, stud :: placeholder :: _ 1, stud :: placeholder :: _ 2)); Return 0; } and come with the following compilation error: testtemplate.cpp: in the function "int main () one ????: testtemplate.cpp: 29: 92: Error: There is no match for calling to call. :: Test :: setCallback (std :: _ Bind_helper) (int, i...

order - REST API Explore: How to get same list ordered like the search on Foursquare Website? -

I am using the REST API (site forum) to get a list of the top 5 locations of the destination and category, As they are listed in search results on the square class website. For example, I request the following to locate API Endpoint:% 26 University I am using Apia Authenticated. I do not pass the radius to get the default radius. Now the results of the API are as follows: 1. Ather Hennerberger HIL 2. Technopkk 3. Contents Stoolfoffen 4. Jair ¼Archter Hochschule Fear of fear, departure music 5. Klubschule Migros When I search on the Foursquare website (NOT LOGIN!): I have listed the following results on the website: 1. SBB Digital 2. Technopark 3. ETH HONNERBERIL HIL 4. EF Education First 5. Kalbschule Migrose on what website API is possible to get the same list of Ikhaa (in that order)? if yes? How can I do that? How do I call the API or how do I sort out the API to get the same list of results? At first I tried to solve the results in the field of rating, but it does n...

forms - Symfony2 force subform validation when every field is empty -

I have two entities (let's call them A and B) to force one from one relation and to populate them. One form B Entity Field Unit A has a population on a state basis: Unit A: State Unit B: Both Fields Empty Unit A: State 1 Unit B: Field 1 unit A: state 2 unit B: field 1 empty field 2 filled Both fields are not allowed in the state. So I created 3 custom callback Vedic and do not have permission to check states 1, 2. Unfortunately, the investigation has not started on 1 and 2 states, when both fields are empty, the fields are clearly empty; By actually linking a fake hidden field the verification process starts, because the form is populated! Obviously this is a Hash solution, so I was thinking that there is a way to force subform validation is empty. does not valid symphony forms, it recognizes entities, your best part is that To validate the work in your institutions and to accept it by using the 'Gator' verification of Symphony: I believe in your ca...

html - Coloring rows in a table with n colors -

Image
I know that I weird and even I can use the colors of the optional rows in a table, however, I want to be able to paint every third row, so colorful red-green-blue-red-green-blue looks like. Besides, I want to make that general and use n colors in style in every n: th line. At the moment, I generate the table dynamically and each recurrence I, each td like modulo0 , modulo1 etc. > Put a class name on the tag. What is a better way? A more automated, this is it. you : nth-child selector 3n With each other, each other can be connected to start each other, second or third. HTML & lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; R & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; G & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; B & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; R ...

javascript - How can I replace the content of a div when I drag and drop -

When I leave, how can I drag and change content; in this instance:? function allowDrop (ev) {ev.preventDefault (); } Function drag (ev) {ev.dataTransfer.setData ("text", ev.target.id); } Function drop (ev) {ev.preventDefault (); Var data = ev.dataTransfer.getData ("text"); Ev.target.appendChild (document.getElementById); } Try it out: Function drop ( Ev) {ev.preventDefault (); Var data = ev.dataTransfer.getData ("text"); Var s = document.getElementById (data); Ev.target.appendChild (s); Ev.target.src = s.src; } Update your Drop Function like this Basically, you have to update the source of the dropped IMG, it works for now.

javascript - LESS (client side) does not compile certain CSS properties -

The website I'm working on has IE 7 and display: inline-block Need to Support Looking around I think * display: inline; and * zoom: 1; can solve this problem. The problem is that it is not compiled at least in my CSS. Even zoom: 1; does not compile (without star icon) to ensure that I added some other valid assets for the same CSS class and it works. In summary: I can not get the zoom and IE7 CSS-property selector (*) to work with less in my browser. Is there any fix for this? & lt; Script & gt; Less = {env: 'development'}; & Lt; Script & gt; with less 1.5 // IE7 Inline-block // ---------------- .ie7-inline-block () {* display: inline; / * IE7 Inline-Block Hack * / * Zoom: 1; } P {. I7-inline-block (); } Compile to: p {* display: inline; / * IE7 Inline-Block Hack * / * Zoom: 1; }

linux - map specifc virtual address to a specific physical one -

To find a way to do this. Can you tell us kernel version and CPU architecture / type? Generally, if the specific virtual address that you want to map to does not overlap with the kernel virtual address (such as 0xC0000000), and if the physical address that your device does not overlap with the system memory physical address range, then its You can use low-level tasks (if not, you can use mmu to collect language for installation of TLB entries during kernel booting ) The specific virtual a particular address during kernel booting to set the MMU TLB entries to map. I can provide an example based on the 2.6.10 kernel version and the Freescale PowerPC CPU, the Iio_block_mapping function for the object you want.

C++ Qt memory allocation exception with QList -

How could it be that it throws an exception for (int H = 0; H & lt; listOnecount (); ++ H) {Delete] [List] A [H]; } One with the QList list? I repeat float * ARAT until I reach the number of elements in the QList ... Edit & amp; Solution In fact, it fails when I am only adding a float to an item in QList, then it is no other float * and You can not delete [] How could this be a Exceptions thrown One posibility: You added an array 2 time to the list. One fix: for (int h = 0; h & lt; list on count (); ++ h) {delete] [list] [h]; ListOne [hr] = nullptr; } Perhaps other errors (you are not in the list-add array points). Edit: In fact, it fails when I'm only adding a float to an item in QList. Again, this is not a float * and you can not delete it []. I doubt ... a very simple fix: float * p = new float [1]; Exemplary [0] = 3.14f; Now add pi to the list