Posts

Showing posts from April, 2014

c# - reuse group LINQ function -

I would like to reuse a linq-to-sql function, and every time I pass it to another area group by. For example: by group (field X); GroupBy (field); By the public Zero Group (name of the field) {returning from rows in db ....... group by name of group} it was a pseudo Thank you! If I correctly understand your question, then you should reproduce the LINQ method Are trying. By doing this, you can get the results you want, without typing a whole new method: var group1 = someEnumerable.GroupBy (o => o.fieldX ); Var Group 2 = Some Enamorable. Group by (o => o field wi);

android - Using a broadcast intent/broadcast receiver to send messages from a service to an activity -

So I understand (I think) about broadcasting purposes and to get them the message. So now, my problem / which I can not work for is to send a message to the effect of a receiver for onReiveive , say that I have a receiver : Public Class Receive Message Broadcast Extends Expand Receiver {@ Override Public Records on Receive (context reference, intent intent) {string action = intent.action}; If (action.equalsIgnoreCase (TheService.DOWNLOADED)) Send a message to {// activity}}} How do I send a message to an activity? I have to instantinate the receiver in the activity that I want to send messages and monitor it in some way? what else? I understand this concept, but in reality there is no application. Any help will be absolutely amazing, thanks. edit Broadcast receiver Corrected examples and manual declarations for registration / unregistered were also deleted. Define get message as an internal class within activity for which to hear messages from service ...

java - Web Server: use Service instead of Thread -

I have written an app that implements a web server with multithreading. The main activity has a button to start / stop a thread. When the server is on, it stays in listening to the thread and, if there is a request, it creates a new thread to serve it. The app works fine, but now I use a service instead, so it can work in the background. Actually, I have done this design: Web server Java Sets the class webserver Runnabal {Secure thread t; Public Zero Starter () {ON = True; T = new thread (this, "webserver"); T.start (); } Public Zero Stop () {ON = false; T = null;} Public Zero Run () {while (current) ...} is public () {upon return; }} DroidServer.java class extends the DroidServer webserver {...} MyActivity.java increases the MyActivity activity of the public class {ws = new DroidServer (8080, this); Btn.setOnClickListener (New OnClickListener) {Click on Public Zero (see V) {if (! Ws.isOn ()) {ws.start (); BT.N.Set Text ("Stop");} and {Y...

ios - An error occurred talking to the iTunes Store : message while validating App -

I am trying to submit an app to the Apple Store via an encoded 4-in-built application loader. I have created a collection, then it went to connect it and it is ensured that the app's condition is ready to upload. Then when I come to exode and 'valid' or 'deposit', I get the following message: There was an error talking to the iTunes Store No details were given. any idea? Update: I used the classic app loader and submitted my app to not know what was the real issue. My MBP now runs Xcode4.2 (4D199) on Lion, I have the latest Java for Sher And eventually I messed up the issue. Many people say that they can use the old Applauder app to upload the app. So I think the problem is the latest Apoller app (2.4.1 (1920)), and this fact tells me that I am right okay, in summary: Here's the solution: I hope that you will not destroy the old Xcode (4.1). We should choose the old version app loader app CD / Content / Resources / Package CP ApplicationLoad...

java - encapsulation means putting related items together? -

I was going through and it has been said that encapsulation means that related items should be put together, but I do not know the example of an article representative: UserProfile.js Although this example is in JavaScript, I am looking to understand these concepts in java . Can anyone tell me these two questions with a pseudo-code: What is the encapsulation? Why do we need encapsulation with a proxy code? Michael has corrected it. Object Oriented Programming Encapsulation is the first step in encapsulation, the process of covering data and tasks in an entity (data is called). An encoded object is often called an intangible data type. Ref: Encapsulation is essential for hidden features. So why do we need it? P> Programming To solve that problem, it is about translating a solution to a problem in a logical code. Because of this, there are many complex methods and functions that we do not want to use that Joe Four developer. We will cover those methods (o...

facebook graph api - Could FB API send request to particular friend -

I know I can use the FB API to send the request, but let me choose those people from my friends list Will happen. Is there a way, can I choose specific friends from the list or send a request to some specific people directly? Thank you! You can use it.

android - Randomly selected index in integer array causing crash -

This should be a simple fix, but I can not get it ?! I want to randomly select an integer from an integer array and a bitmap load of it - sometimes it happens, but most of the time this error occurs - I do not know how I Going out of the array? At first I have used array.length () and then array.length () -1, but now I am securely using a range between start and end ~ which What I do not want to do public int GetRandomNumber (int min, max max) {return minute + (int) (Math.random () * ((max - minimum) + 1)); } Whatever the public null () {integer [] images; Imagines = new integer [9]; Imagines [0] = R. Drourabable splatter1; Imagines [1] = Ardhableable splatter2; Imagines [2] = Ardhableable splatter3; Imagines [3] = R. Drourabable splatter4; Imagines [4] = R. Drourable splatter5; Imagius [5] = Ardrauble. Splatter6; Image id [6] = armorable. Splatter7; Imagines [7] = Arradrouble. Splatter8; Imagines [8] = R. Drableable splatter9; Image id [9] = armorable splatter10; Bitmap ass...

SQL Server database design: Advice on many to many relationship -

I am setting up a database and in one place where I am confusing myself in many different tables I am I am looking for some advice in the best way of designing it for performance and scalability. I will put an example of my establishment and I am trying to lower it. I have the main object table ... account account id. Khatnam ----------------------- 1 | The first account ... and then the child object should be allowed. Pages PageID | PageName ------------------ 1 | First page control ControlID | ControlName ----------------------- 1 | First control menu menutime. MenuItemName ------------------------- 1 | Menu item 1 I have permission table for reading / writing etc. ... Permission permission id Permission name ------------------------------ 1 | CanRead 2 | Canwrite 3 | CanDelete So I'm trying to tie permission tables between multiple objects and child objects in several-to-many. Permission Account ID | Permission id Contro...

iphone - search bar and table views are not fitting to the screen in land scape mode -

Image
I am creating a search bar and table view program using the following code UISearchBar * Searchbar = [[UISAxchangebar Alok] InitWith Frame: CGRactMake (0,0,320,40)]; SearchBar.delegate = self; [Self.view addSubview: searchBar]; UITableView * tblView = [[UITableView alloc] initWithFrame: CGRectMake (0, 41, 320, 400)]; TblView.delegate = self; TblView.dataSource = self; [Self.view addSubview: tblView]; Now I have returned the return value in the following method to rotate the screen readet device orientation - (BOOL) should be used .UrototettoInterfaceArrayation: (UINPreference Orientation) Interface Orientation {Return Yes; } and I've used the following code in loadView in self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth. UIViewAutoresizingFlexibleHeight; The following is my output You have asked to change the size of the view, but you have not asked to change the way you created the search bar again: searchbar.autorezingMask = UIViewAut...

Problem with button click event in jquery -

I'm using jQuery Click Button to click on div but I do not know why it is not working. . HTML: & lt; Input type = "button" id = "addmoresg" value = "add more" name = "button" & gt; & Lt; Div id = "addsg" style = "display: none" & gt; & Lt ;! - More HTML here - & gt; & Lt; / Div & gt; Javascript: $ (document) .ready (function () {$ ('. Addmoresg'). Do (function () {$ ('. Addsg'). Show ("slow");});}); jsfiddle demo: I can not find any results on the button click. 2 problems: You as a library in your demo JQuery is not selected. Use ( .addmoresg ) instead of ( #addmoresg ) in your elements only id S, not class es: input type = "button" id = "addmoresg" value = "add more" name = "button" & gt; $ ('. Addmoresg)' elements to class = "addmoresg" , such as ...

linq - How can define multiple KEY in EntityFrameWorkClass C# -

सार्वजनिक वर्ग UserImage {[Key, Column ("UserID")] सार्वजनिक "post-text" itemprop = "text"> [तालिका ("टेबल_यूज़र इमेज")] नल से & lt; Guid & gt; UserID {प्राप्त करें; सेट; } [कुंजी, कॉलम ("इमेडैड")] सार्वजनिक नल योग्य & lt; int & gt; ImageID {प्राप्त करें; सेट; }} दोनों कॉलम प्राथमिक कुंजी हैं लेकिन मॉडल केवल एक समय में एक कुंजी स्वीकार करते हैं, तो मैं इसे कैसे आ सकता हूँ? कोई समाधान है? कृपया साझा करें? मेरा मानना ​​है कि आप एक समग्र कुंजी का वर्णन कर रहे हैं, जो कि दो या अधिक कॉलम। ईएफ में इसका वर्णन करने के लिए, आपको चाबियाँ के लिए कॉलम ऑर्डर देने को भी परिभाषित करना होगा। इस तरह से: [तालिका ("टेबल_उसेर छवियाँ")] सार्वजनिक वर्ग यूज़र इमेज {{कुंजी, कॉलम ("यूजरआईड", ऑर्डर = 0)] पब्लिक गिड? UserID {प्राप्त करें; सेट; } [कुंजी, कॉलम ("इमेजेड", ऑर्डर = 1)] सार्वजनिक इंट? ImageID {प्राप्त करें; सेट; }}

javascript - What is an alternative to using getElementByClass for hiding multiple elements? -

I have a page with some links that I would like to be able to toggle with two buttons. It works with a link using getElementById, but I need to toggle some of those groups. I started with it, but it failed to work. I've heard that GetElementByClass has worked with everything but IE, but I'm using Opera 11.5 and it still does not work. I've searched a bit, but I'm new to some JavaScript and most of the explanation is not understood. Does anyone help me with a simple option, or can I help me fix the problem I've made? This is a test page I was using. & lt; Head & gt; & Lt; Script type = "text / javascript" & gt; Function hideNames () {document.getElementByClass ("WebName"). Style.display = "none"; } Function ShowName () {document.getElementByClass ("WebName"). Style.display = "inline"; } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P class = "web...

python - Django Pinax , extending bundled applications -

I want to use pinakes for a small project, but I am confused because I can not do behavior Can there be any documents to extend / change the functional and bundled applications of the applications provided? Example: In the registration application, I want to add custom field, but I can not find the appropriate documents to get it. (Mainly Thanks Yes, you can expand the behavior of the underlying applications if you use Pinx Basic Setup with user accounts and profiles. If you are using, you need additional fields in the App / Profile / Models For a list of field types, see here: When you run manage.py syncdb , it will create the required DB fields for you if you already have If you have already configured DB, then you have to manually add the DB column. If you do not have any data in that table, you can always drop the table and recreate it. The DJ does not modify the tables , Once they are created They are, even if you change the model. You must also modify the signup f...

permissions - Remote File Accessing from Sharepoint Application Page -

In my SharePoint application pages, I am trying to copy a file from a network shared folder .. and my The code is like below. try {file.Copy ("\\ MShare \ public \ Test.txt", "C: \ Temp \ Test.txt", true); LblMessage.Text = "File copied."; } Hold (Exception Pre) {LblMessage.Text = ex.ToString () + "-" + East message; } If I test the same code in ASP.NET website then it is working well. But I am having an error with the SP application page. . system. Agyatikrit Access Exchange: Path enter '\\ MShare \ Public \ Test.txt' disallowed System.IO on System.IO.File.InternalCopy on System.IO.File.Copy .__ Error.WinIOError (Int32 errorCode, String MaybeFullPath) (string SourceFileName, string destFileName, Boolean overwrite) (string SourceFileName, string destFileName, (object sender Boolean overwrite) at TestApp.PullingFile.ButGet_Click, EventArgs e) - path '\\ MShare \ Public \ Test.txt' Access is prohibited. I post've...

jsp in a html frameset not compiled : weblogic -

मेरे पास यह सरल कोड है: & lt;% @ page import = "java कब * "% & gt। & Lt;% @ पृष्ठ आयात = "java.util.Properties"% & gt; & Lt;! Doctype html सार्वजनिक "- // W3C // DTD HTML 4.0 ट्रांस्क्रिप्शन // एन" & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; शीर्षक & gt; विजय की टीस्ट & lt; / title & gt; & Lt; / head & gt; & Lt; फ़्रेमसेट पंक्तियाँ = "17%, *" & gt; & Lt; फ़्रेम नाम = "हैडर" src = "test_headers.jsp" स्क्रॉलिंग = "नहीं" नोडेज़ फ्रेमबॉर्डर = "0" / & gt; & Lt; / फ्रेमसेट & gt; & Lt; / html & gt; लेकिन समस्या मुझे 404 त्रुटि मिलती है - जब मैं संकलन करता हूं & amp; चलो कहना है जेएसपी जो कि चलाया जाता है Test.jsp । Test.jsp का स्थान - वेबकॉन्न्टेंट Test_headers.jsp - वेबकॉन्न्टेंट फिर यह मान्य है। & lt; फ्रेम नाम = "हैडर" src = "test_headers.jsp" scrolling = ...

Play framework scala Intellij IDE action not found -

I am trying to set up a basic SCALA application with Intelis IDE (V10.5.1). I followed the instructions When I start the application with the IDE, it's all right: 01: 44: 20,734 INFO ~ The application 'Hello 6' has started now! But when I try to open a page in the browser I am getting an error in the output: application.index did not get the operation play.exceptions.ActionNotFoundException: verb application.index was not found at play.mvc.ActionInvoker.getActionMethod (ActionInvoker.java sheet85) On invocation at play.mvc.ActionInvoker.resolve (ActionInvoker.java:84). HTTP Reason (Play!) Reason: java.lang.Exception: Controller Controller. Application not found It seems that Scala compilation is not happening for some reason. Everything is fine if I'm running the application directly from the game server. Play v1.2.2, Scala-module 0.9.1. Tried in Ubuntu 10.4 and Windows 7. update path file and application.scala # home page GET / application.i...

performance - How do I do something like a memcpy in D -

I have a storage space and I want to copy a byte of a certain location to another, how do I do this Can I in D? For example, how do I do this: int main () {void * src_data = 0x40001255; Zero * dst_data = 0x47F22000; U32 size = 0x200; Memcpy (dst_data, src_data, size); } In addition to how to fill up a faster structure: struct data_struct {u32 block1; U32 block 2; U32 Block 3; U32 block 4; U32 block 5; U62 Block 6; U128 big blocks; } Data_struct_t; Int main () {zero * src_data = 0x40001255; Struct data_struct_t dst_data; U32 size = data_struct; Memcpy (dst_data, src_data, size); } Thanks! Reel will submit an array copy to a piece, which internally calls memcpy. Zero main () {zero * src_data = 0x40001255; Zero * dst_data = 0x47F22000; UIT size = 0x200; Dst_data [0..size] = src_data [0..size]; } for another: struct data_struct {uint block1, block2, block3, block4, block5; Ulhone Block 6; UIT [4] big block; } Zero main () {auto src_data = cast (data_struct *)...

iphone - UITableViewCell dynamic height :/ -

O All, I have created a UITableViewCell with an NIB file. It has 1 label that contains a tweet. So it needs a dynamic height that is also a time label that has to fit under the label. I am trying to stuff things with the frame frame, but I can not find the right solution .. I remove it in the UTable watch file. self.tweet.lineBreakMode = UILineBreakModeWordWrap; Self.tweet.numberOfLines = 0; Self.tweet.font = [UIFont fontWithName: @ "Arial" Size: 13.0f]; [Self. Tweet size tofitt]; CGFloat TwitterHigh = self.tweet.frame.size.height; Self.timeAgo.lineBreakMode = UILineBreakModeWordWrap; Self.timeAgo.numberOfLines = 0; Self.timeAgo.font = [UIFont fontWithName: @ "Arial" Size: 11.0f]; [Self. Timego shape tofitt]; CGFloat TimeAgeHeight = AutoTimeOgo Frame.ize.height; Self.timeAgo.frame = CGRectMake (88, TwitterWire, 100, TimeAgeHight + 10.0F); I have also tried a string helper in the tutorial. I use different cell styles. At the moment, ...

java - How to programmatically trigger onclick event -

मैं प्रोग्राम को टॉगल ऑनक्लिक / अपूर्ण ईवेंट कैसे ला सकता हूं? उदा। & lt; p: कमांडबटन मान = "विश्व को नष्ट करें" onclick = "confirmation.show ()" प्रकार = "बटन" / & gt; & Lt; p: confirmDialog संदेश = "क्या आप दुनिया को नष्ट करने के बारे में सुनिश्चित हैं?" ShowEffect = "bounce" hideEffect = "explode" header = "नष्ट करने की प्रक्रिया आरंभ करना" गंभीरता = "सतर्क" widgetVar = "पुष्टि" & gt; & Lt; / p: confirmDialog & gt; मैं ट्रिगर करने की कोशिश कर रहा हूं onclick = "confirmation.show ()" एक बैकिंग बीन से। मैं JSF2 / Primefaces 2.2 का उपयोग कर रहा हूं। आपको अपूर्ण का उपयोग करना चाहिए कमांड बटन का onclick के बजाय विशेषता पृष्ठ पर वापस क्लिक करने से पहले जावास्क्रिप्ट इवेंट होता है, संभवतः पृष्ठ पुन: लोड होने के कारण आपके संवाद को प्रकट नहीं होने का कारण बनता है। अपूर्ण = "confirmation.show ()" प्रदर्शित करेगा पोस्टबैक के बाद संवाद। ...

java - Log4J Event Viewer Problem -

I am canceling 2 applications and publishing them on the Websphere Aplication server. Since I have to type errors that are on both the applications on the event viewer, I was successfully loaded the log4j JAR file and file OS on the lib folder of Websphere Aplication server. I created the log4j.properties file under src root, with the package of both projects with various variable names and source design ("AA" and "App B"). When an execution is caught then the event viewer is being logged for both cases. The problem is that the name of the source is the only "application A" presented, even if there was an error on App B ... Can anyone help is? Thank you However, I see a problem in your configuration: When you put your Lodge 4J Jar in the WAS Lib folder, it is filled with a class loader for both of your applications ( A bootstrap class loader or extension class loader depends on the basis of this "Lib" directory) - and this means...

mysql - sql encoding in php script -

Hey, I'm using mysql in Hebrew, but when I try to preview SQL in the page, So i see ????? Formula $ con = mysql_connect ($ server, $ user, $ pass); Instead of my words the code I am using is normal SELECT $ con = mysql_connect; Mysql_select_db ($ db, $ con) or die ("no db"); $ Query = "SELECT` from app_desc`` where` id` = $ id "; $ Result = mysql_query ($ query); And I also tried to add mysql_set_charset ('windows-1255', $ con); or mysql_set_charset ('utf8', $ conn); Whenever I see it in PHPmyAdmin, it should show as it should. What do I have to do? This is also the database encoding Utf8_general_ci and the page encoding is utf-8 OK I'm silent. Thanks for your reply. The problem is that the DB encoding was UTF-8 but the table was Latin Well I'm The problem is that the DB encoding was UTF-8 but the table was Latin

javascript - Structure for handling several script loaded from ajax -

As so many people, I have a problem handling scripts from external pages loaded with AJAX. I'm trying to set up an "admin panel" page on it. I want to be able to navigate to many admin pages within the panel. Different admin pages include internal & lt; Script & gt; and external JS-files are included in the scripts as much as they want, but they are stacked or they are not managed in any good way. I did a small test on one of the admin pages: $ ('.left-col'). Click (function () {alert ();}); Here, whenever I come back to this page, it will bind another click so that I can get two alerts every time I click the div. I can easily solve it by running $ ('left-col'). Unbind (); in my ajax.success However for some admin pages there are plenty of .click / .change / .live and I do not even know what they are (i.e. external plugins From). So can I remove / remove / remove all the scripts loaded from each Ajax-loaded page without any inte...

Initial steps to be followed for making an Universal iOS application -

I'm just about to start a universal iOS application. I just want to make this application to use the interface builder. How can I arrange two nib files in one swung? Whenever I create a class, only a xib file is created, but I want to be a universal application for two xib files, one for iPhone and the other iPad application. In addition to this, you can also suggest which approach is better, i.e. creating a UI for this universal application through interface or coding. Just add another xib file to the project. You can start by making a copy of the first version that you create, or with empty xib. To ensure the correct xib is loaded on the runtime, you have a few options I like to overload the Oiban name on UIViewController, but you can only call init with: NIBN:, right Nib's name is passing. If you have an overwritten note, then something like this can be done: - (NSString *) Setting {return UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPhone? @ "M...

how to implement opengl es 2.0 2D scene zOrdering? -

I want to present a 2D view using OpenL ES 2.0. In this scene I have to have a set of sprites (quads) to present. I'm using physical projection. I want every phantom to get some z-values ​​that will determine whether it looks front or back or not. But if I want to present sprites not in the z-value order, how can I still get z-ordering? Despite the fact that you have an ortographic projection, 3 dimensions are still there to make sure that the closest And forge values ​​include your items, and remember to enable depth testing. Then you can replace all your 2D coordinates with the appropriate 3D coordinates.

create instance of a class in the same class's definition in python -

I am trying to create a new MyClass instance in the definition of MyClass. Why does this code fail and how can it get it? class MyClass: def __init __ (self): self.child = MyClass () mc = MyClass () Well, it fails because there's infinite recursion in it, think about it, if every micellus has a child who is a myclass, then it's infinity Will be! You can solve it in some ways First of all, you can have a parameter for the creator: class MyClass: def __init __ = True): If created: self.child = MyClass (wrong) MC = MyClass () Or, you can have another, external method: class MyClass: def set_child (self, children = none): # I like to make a child alternative child = Miklash () for ease of use. If there is a child then there is no other child. Children = Baby mc = MyClass () mc.set_child () I personally prefer the first solution because it means that external objects do not need to know anything about the class Of course, you can add two: class MyClas...

c - Assembly-level function fingerprint -

I would like to define that two functions were compiled from two functionalities (C) source code, and would like to To do this, even though they have been compiled by different compiler versions or with different collection options. Currently, I am considering implementing some type of endemler-level function fingerprinting. The fingerprint of a function should have properties: The two functions compiled from the same source in different conditions are likely to have the same fingerprint (or similar one), Two functions compiled from different sources are likely to have different fingerprints, (Bonus) If two source functions are the same, then fingerprints are similar (for some reasonable definition of similar). What I am seeing for now is a group of merits of collective work which are personally satisfied (1) and expectations have also been taken together (2). . Beliefs Of course this is usually impossible, but something that might exist, which will work in most cases...

Ruby on Rails/will_paginate: Ordering by custom columns -

I have a complex complex SQL query whose result must be endorsed and displayed on the user. I do not want to go into the details here, but to make it simple I just select all the columns of a model, and an additional column , which is used only for serial purposes. Note. Selection (['Notes. *', '& Lt; rather complex section & gt; AS' x '"]) .Jom (...) ... some and .group () , I finally call .order () and on the Paginate relationship If I order through the natural column of any model then everything is fine, if I order by the "artificial" column x , then rail gives me an error: not such column: x It seems because will_paginate gets actual data The first one seems to be a COUNT (*) -tatment, to process the data just to get the amount of data from the original statement. COUNT (*) -statement ( I.e.), which contains ORDER BY x . The problem is now, that will_paginate by order in statement but simply COUNT (*) And t...

PHP Saving Session Variable -

I'm trying a new captcha script to call the captcha code that you use: $ _ Session ['captcha'] ['code'] Good works when I echo it on the main form, but when I submit the form it resonates Do, it displays a new code, so I can never find out that it was the old code when they were Rm was deposited. if ($ _ POST ['submit']) {resonance $ _SESSION ['captcha'] ['code']; } How can I save data for that session and can not change it any more? Put this in your own session: $ _ Session ['old_captcha'] = $ _SESSION ['captcha']; Then, when the form is submitted, then use your variable: if ($ _ POST ['submit']) { Echo $ _SESSION ['old_captcha'] ['code']; }

flash - AS3 playing/communicating with external swf -

OK, then a test will bring an external SDF such as: var loader: loader = New loader (); Var url: URLRequest = new URLRequest ("load2.swf"); Loader.load (url); AddChild (loader); Now trying to do a goto envieque and play it like this: var loaded: object; Loader.contentLoaderInfo.addEventListener (Event.Complete, Handled); Function Handle Loaded (E: Event): Zero {loaded = e.target.content; } Load1.addEventListener (MouseEvent.CLICK, handleClick); Click Function Handle (E: MouseEvent): Zero {if (Weighted) {loaded.gotoAndplay ("outro"); } // Other content here } This simple external test is 10 frames in SWF @ frame1 is labeled "Introduction", @ frame5 contains the "stop" action, and on frame 6, one "Outro" is labeled. The problem is, when I click on the button, the external SFF reloads and plays from frame 1. Any ideas / tips / hints etc. please appreciate it in advance thanks in advance. Try to cast as loaded as a ...

c# - Capture filled PDF form data -

I want to capture PDF form data filled with public face website and would like to save it to the database on the server. Is this possible? Please tell me Yes, this is possible. You need a submit button on the form, in the properties of the submit button, select the FDF as the data type. Every field from the PDF document will be a name. Textbox1, Textbox2, etc. and you will get name-value pairs. I have received the full PDF document in my controller (ASP.NET MVC application), as follows: string fileename = path.Combine (Server.MapPath (RootPath), name); (By using filestream fs = new filestream (filename, filemod.createNue) {byte] bytes = new byte [8192]; int bytes read; while ((bytesRead = Request.InputStream.Read (bytes, 0, bytes. })> 0) {fs.Write (byte, 0, bytes read);}} In this case the file name is a temporary filename that is located in the temporary area Where I used to write. Another solution would be to write the file in memorystream and Then it will be used ...

video - MPEG 2 - Adding custom tags via editing the source -

I'm looking for advice and what I want to do is possible. I have been asked to create something similar to the ID3 MP3 tag which can be used with MPEG2 / MPEG-TS video files. Because I'm a raw person, I was just thinking of dumping some type of XML structure within the file, however, this causes problems with applications that try to decode / run the file because the app is in the file XML / ASCII data is not expected. The end of the file 'command' which can be modified at the end of the MPEG files, and I can dump my XML after that part. According to the compatibility, I only need to avoid the video file by breaking a video. The app that is reading the information tagged will be parsed with an application that I have written so far. Any thoughts? Or am I suggesting impossible? Thank you. Any program decoding an MPEG 2-ts file repeated checking of an 188 byte packet Still working. If you look at the hex, you will see a 0x47 byte, which is also a sync byt...

php - Converting a popup window uploader to an inline script using jQuery? -

मेरी स्क्रिप्ट में कुछ बटन हैं जो call.open ('myUploadScript.php? Arguments = test ...' , '')। मैं प्रक्रिया के लिए myUploadScript.php लक्ष्य फ़ाइल के लिए तर्क () के लिए क्वेरी स्ट्रिंग पैरामीटर पास कर रहा हूं। मैं इसे एक पॉपअप में बिना खोलने के लिए इस स्क्रिप्ट को कॉल करना चाहता हूं। मेरी पॉपअप विंडो स्क्रिप्ट पर खरोंच से शुरू किए बिना क्या मैं इसके लिए jQuery का उपयोग कर सकता हूं? दूसरे शब्दों में, मेरी खिड़की। Open में शामिल हैं: & lt; input type = "बटन" id = "myButton" value = "myValue" onclick = "window.open ('myUploadScript.php? एक्शन = टेस्ट', 'पॉपअप', 'चौड़ाई = 330, ऊंचाई = 300, स्क्रॉलबार = नहीं, resizable = no , टूलबार = नहीं, निर्देशिका = नहीं, स्थान = नहीं, मेनूबार = नहीं, स्थिति = नहीं '); वापसी लौटा "/ & gt; क्या मैं इसके बजाय एक jQuery को कॉल कर सकता हूं जो myUploadScript.php की सामग्री को एक प्लेसहोल्डर डिवा में लोड करता है, इसे "परीक्षण" तर्क देता है? ...

Combining vertex arrays with textures in OpenGL -

I am trying to use top arrays to attract a large network, in which large numbers of vertical is. Textures have been defined by them and are easy to draw in instantaneous mode with: glBegin (GL_TRIANGLES) {for (int faceIdx = 0; faceIdx & lt; nFaces; ++ FedEx Glavetex 3 FV (& VertixArere [VIDX]); GlTexCoord2fv (& amp; texCoord [vIDx ++]); GlVertex3fv (& amp; vertexArray [vIdx]); GlTexCoord2fv (& amp; texCoord [vIDx ++]); GlVertex3fv (& amp; vertexArray [vIdx]); GlTexCoord2fv (& amp; texCoord [vIDx ++]); }} Glend (); However for the readability, speed and rest I want to use the top arrays (with a view to go to VBOs). Is there a way to put the same head in the array multiple times? As I think, at this time it is necessary to specify each peak of the network many times as it appears in the face of Aries, as each head has many identical coordinates The object is estimated by the real image of reality to the net), that is, my top / text corrects array r...

android - Scrolling past header view in a ListView? -

मेरे पास एक विशिष्ट listview है, इसमें एक हेडरव्यू है मैं y स्क्रोल मान सेट करना चाहते हैं, इसलिए मुख्य रूप से प्रारंभ उपयोगकर्ता के लिए छुपा हुआ है। मेरे प्रयासों से अजीब परिणाम सामने आए हैं। मुझे हेडर्व्हीव (40dip) की सटीक ऊंचाई पता है, इसलिए मैंने सोचा था कि मुझे उस ऊंचाई पर स्क्रॉल- Y पॉइंट को तुरंत सेट करने में सक्षम होना चाहिए और यह जाना अच्छा होगा: ListView lv = getListView (); Lv.addHeaderView (mHeaderView, रिक्त, गलत); lv.setAdapter (myAdapter); // 1) काम करता है, लेकिन पहली बार मैं स्क्रीन को छूता हूं, // सूचीदृश्य इसकी स्क्रॉल स्थिति को शून्य के लिए फ़िसल जाता है / तुरंत, बहुत अजीब। Lv.scrollTo (40 * घनत्व); // 2) OnCreate () में काम नहीं करता है, काम नहीं करता // यदि एक पोस्ट में लिपटे। lv.setSelectionAfterHeaderView (); // 3) ओनरेकेट () में काम नहीं करता, काम करता है अगर // एक पोस्ट में लिपटे। Lv.listView.setSelectionFromTop (1, 0); listview पर मेरे क्लिक अब एक के बाद बंद होने लगते हैं, ऐसा दिखता है कि हेडर्व्यू को अब एडाप्टर में 0 वां मद के रूप में व्याख्या ...

How to run lower version creating iPhone app to upper version of Xcode -

I created an app on SDK version '2.2.1', now I am using SDK version 3.2.6 . But when I'm running this app in version 3.2.6, I am getting an error message such as bellow: Error: No SDK with name or inadvertence with 'Ioos 2.2.1' How can I move this app to this version now? As you update the exode in new editions, old SDKs are removed, you will get new SDK (eg IOS 4), and then on the deployment target you have to target the version where the application will be run (2.2.1 if you wish it is the same).

php - How to get content of a javascript/ajax -loaded div on a site? -

I have a php-script that loads page-content from any other website using curl and simple_ html_dom php library is. It works great if I return HTML then I can see div-content there. However, if I try to select only that div with simple_html_dom, then the developer always gets empty. At first I did not know why I now know that its content is apparently Popups with javascript / ajax. How will I get the content of the site and then with Javascript it will be able to select div-content after the population is the right content? Is this possible? Thanks! Yes, the piece of cake if you are interested only in that special html that will come back by AJAX has gone . Collect information such as URLs, parameters and request types (post / received) from that AJAX request. Generate a single request from your php / curl code and you expect and hope that the server logic will not investigate who sent the request.

python - paramiko Incompatible ssh peer (no acceptable kex algorithm) -

I'm getting the following error while trying to ssh on a Cisco ACS device using the paramico library The problem is to use paramiko in Python, and I can use this box from the command line, or without any problem putty. I have started debugging and copied the information here. Please tell me if you can help me. import paramiko Try import systems: paramiko.common.logging.basicConfig (level = paramiko.common.DEBUG) sshConnection = paramiko.SSHClient () sshConnection.set_missing_host_key_policy (paramiko.AutoAddPolicy () ) sshConnection.connect ( 'server', username = "username" password = "password") except paramiko.BadAuthenticationType: sys.stdout.write ( 'bad password \ n!') excluding cis Paramiko.asacaksepshn. Exit (), sshFail: sys.stdout.write ('Connection Fail! \ N') sys.stdout.write ('% s \ n'% sshFail) except sys.exit () socket.error, socket file: sys. Stdout.write ('failed to open socket') sys.stdout.write (...

MySQL C API compilation error, crtdbg.h not found -

I am creating a basic program that uses mysql api, I am on windows, my compiler and eclipse CDT As I am using Mingav as my IDE, I have said that paths in mysql are included and the lib path in mysqlclient.lib file is included. However, I get this error: D: \ Programs \ MinGW \ include \ mysql / my_dbug.h: 108: 20: Fatal error: crtdbg.h: no such file or directory This is my code: #include & lt; Stdio.h & gt; # Include & lt; My_global.h & gt; # Include & lt; Mysql.h & gt; Int main (int argc, char * argv []) {printf ("hello world"); Return 0; } If anyone is not able to help me with that problem, can anyone tell me that between using mysqlclient.lib and libmysql.lib / libmysql.dll What is the difference? Cheers I am afraid that there is no crtdbg.h in minigu distribution. I think that on Windows, this header comes with Microsoft compiler. I believe that you can use Siegwin instead of Microsoft's compiler, because compiling MyScal...

java - Why does Math.ceil return a double? -

This one threw me for a bit of a loop when i Math.ceil (5.2) then is double 6.0 . My natural inclination was that Math.ceil (double a) will return a long document from: roof (double A) The double returns the value which is less than the logic and is equal to the mathematical integer. But why do double return instead of long when the result is an integer? This is not a necessary question, but I think that understanding the reason behind this will help me to understand Java a bit better. It can also help me to understand that if I would be having problems by casting on a long , eg Long B = (long) math.Syl (A); What do I always feel that it should be? I am afraid that there are some limitations which are problematic. double is longer than example For: Double X = Long.mx_avn; X = x * 1000; X = mathematics.Syl (x); If Math.ceil returned meditation Given that what is the last line, the numbers interval on very large values ​​(posit...

entity framework 4.1 - ASP.Net MVC 3 with EF 4.1: Is it possible to switch from database first to code first -

Net MVC 3 web application. I have created my model using the existing database but now, I like to use the "pattern" Is this possible? How do I tell my solution that I want to make it a table for the new model code? Yes, but your database may not exist Add your reference class, which declares your DBCnet customer as DBCtext; Set;} Add your connect string to your SDF file. Note the important part about building your database: "This is by default if your connection - string indicates a SQL CE or SQL Express database file that was previously on disk You do not have to take any action manually to do this. " So the path to add to the existing database - this is not going to happen.

language agnostic - What to unit-test in a file managing application -

Create a GUI file manager that scans the directory structures and provides different operations on it. What parts unit should be tested? I can think of only a very small part, because the GUI unit is not testable (but GUI-tested) and file system stuff is also not unit-tested, since the results may depend on the used file system and File operation is slow, it is very slow for unit-testing. You can test the unit of GUI logic if you use MVP -View-Printer) Pattern, in it you unit-test your presenter classes, which are independent of your GUI framework You can access the file system which is the unit-test code. File class out / copy. Like fake frameworks are great for this

multithreading - Calling abstract function on boost thread, does not interrupt at interruption_point -

I created an abstract base class to allow multiple implementations of a task, which is usually said through the MFC dialogue This can be done if the user cancels the click then it should be able to interrupt the work. abstract_dll.h: category abstract_dll {public: virtual zero my_task (CFBACK * FB) = 0; Where CFeadback is an abstract class to control user feedback (i.e. progress bar) concrete_dll.h: class concrete_dll {virtual zero my_task (cadback * fb) {// some work / step progress bar boost :: this_thread :: interruption_point (); // Something Work // Step Progress Bar Boost :: this_thread :: interruption_point (); }} Extern "C" abstract_dll * get_class () {new concrete_dll (); } Now within the MFC dialog I load the appropriate concrete.dll and my abstract_dll * dll = module-> gt_ get_class (); Then start a new boost :: thread , which is dll-> Calls my_task (fb); Then when I call thread .interrupt () . The thread is never interrupt...

permissions - How to resolve Notepad++ "Writing error summary to C:\Program Files(x86)\ ...\HTMLTIDY.ERR" on Vista? -

How to solve Notepad ++ "Write the error in summary C: \ Program Files (x86) \ ... \ HTMLTIDY.ERR "on Vista PC? I have the latest version of Notepad ++ (just updated it two days ago) When I try to run TextFX htmltidy, then I can get it from Windows Vista The above error is reported. I have set permissions on file htmltidy.err so that everyone can read / write / write. I do not understand file permissions in Win Visa. The second issue: Whenever I click to launch Notepad, I still have to click on 'Allow' + However, if I provide Program Extension Administration rights, the UAC says that This is an unknown program. Do I have to reboot to make these changes effective? What am I missing? This is not an error, only one message: Any errors found in HTML files are being written in this file. For example: Row 1 Column 1 - Warning: The Declaration Declaration

JQuery Show Hide showing multiple content -

I have trouble showing 1 for large documents on a large scale. This showhide will also have other elements within it Be able to include, such as ol ul li etc. Currently I'm having difficulty displaying content other than tags, hide the original show Also displaying a box with that content in it. HTML: & lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "showhideJQuery.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Style & gt; . ShowHide {width: 500px; Height: 200px; Margin: 1 AM. 5 AM; } .showhide h3 {margin: 0; Padding: .25 AM; Background: # 0033CC; Border-top: 1px solid # 666666; Border bottom: 1px solid # 666666; }. Shoehide div {padding: .5em .25em; } & Lt; / Style & gt; & Lt; Body & gt; & Lt; Div class = "showhide" & gt; & Lt; H3 &...

php - Zend Framework application design - should session variables be accessed in the Model layer -

I am working on this app which reaches the session variable in the model layer. It seems wrong, but I am ready to prove wrong. Probably not wrong, but in most places in the app, session variables are handled in the controller and passed as logic, but in other places, the value of the session is only accessed. Am I wrong that it looks like bad behavior? Edit: One reason I do not like sessions in the model is that it seems to make it more complicated to test. It passes only as the work of the Supreme and then the records are passed back. thx It depends. The way I think about it is like this: A model represents your data layer. Conclusion : If your model represents, session is stored in session, models It is ok to access that data from within, the example is a session-based shopping cart. The objects in my car are the models of my session data.

Any java based open source tool like AutoIT? -

Imagine any Java based open source tools like AutoIT to Windows Function According to this, we can assume that many projects in Java will not do this. The following thing to consider as the answer to your question (although I do not accept 100%) are the following posts: and

javascript - Is null after getElementById? -

There is a very easy error here, I'm sure, but basically I have an ID formID Calling this way: & lt; Script type = "text / javascript" & gt; Function redvalidate () {var form = document.getElementById ("formID") var fields = form.getElementsByClassName ("validate"), and I'm getting the error: UPDATE > Ok so basically I have two onsites for a form, which obviously works does not. So what I'm doing is calling this function from someone else ... This type of tag is: And Heres RememberFormFields: & lt; Script type = "text / javascript" & gt; Function RememberFormFields (form, list) {redvalidate () ... etc ... rememberformfields function ... et.c .. & lt; form id = "formID" ... anywhere on your page, you just do not need to load your javascript after the DOM is ready. Attempting to get an ID from an element that has not yet been implemented on the DOM and thus JavaScript...

REGEX - Allow Numbers and . - / -

I just need a regular expression to allow numeric and ( .- / ) It should give some such permission: 011.235673.98923 / 0001-12 The pattern you are looking at matches only those stars,., -, and /: ^ [0 -9 \. \ - \ $] If you have a specific language that you are looking to implement it, then I can help you.

javascript - help on chnaging images within a 'flash embedded image' -

This website is new to construction but is going there, but we are a bit stuck on the following embedded flash image: [kml_flashembed movie = "http://www.griffintaxfree.com/images/logos/stacklogos.swf" height = "250" width = "500" /] I need to know how to open it, change the images inside it, and then post it again on our web page. It was created by someone who no longer handles our site, and we have managed a lot for ourselves but for this we need help. Common common man's rules please? Thanks a lot Griffin It is necessary once the program is compiled in SWF, then what is inside is very difficult to remove. If you can get the program to display the image then it is probably easier to take a screenshot.

asp.net mvc 3 - MEFContrib.MVC3: Exporting Controllers with Base Classes -

I have opened a question but I have not received any response. Actually, I have a base controller that comes from all my controllers when I create a new MVC3 project, put my controllers in another assembly, and add MEFContrib.mVC3 to the project Everything works great when I deprive any controller of my base class, so they can not meet now. I am not quite familiar with MEFContrib, to know what is okay, but I have tried to decorate my controllers ExportAttribute s and it has not worked , Either. This is a different assembly than the main MVC project: Public class MyBaseController: controller {...} // This controller was not found. Public Class Home Controller: MySQL Controller {Public Action Result Index () {// Do Stuff Return View (); }} // This controller can be found Public Square Home Controller: Controller {// yada, yada, yada ...} Edit: The counselor was absolutely right I had dependencies that were not properly marked for export and hence the controllers cou...

doctrine2 - Getting odd behavior from $query->setMaxResults() -

When I call setMaxResults on a query, it wants to treat the maximum number as "2" Regardless of whoever is real value function findMostRecentByOwnerUser (\ Entities \ user $ user, $ border) {resonant "2: $ limit "; $ Query = $ this- & gt; GetEntityManager () - & gt; Security ('Select from Institutions' Thread TJnnetT.Message is joining Teahu GroupG where G. User User:: Order for the owner by MEMSTamp DESC) ;; $ Query-> Setpalmator ("owner_gier", $ user); $ Query-> SetMaxResults (4); Repeat $ query- & gt; GetSQL () "& Lt; br & gt;"; $ Result = $ query- & gt; GetResult (); Echo "3:". Count ($ result); Returns $ results; } When I exclude the setMaxResults line, I get 6 results. When I leave it, I get 2 most recent results. When I run the generated SQL code in phpMyAdmin, I get 4 most recent results. The generated SQL for reference is: SELECT & lt; Too many columns, all T0_ & gt; T0_...

shortest path - How to find the least cost to visit every vertex in an undirected, weighted graph at least once starting from a predetermined vertex? -

The route taken is not to end back to the predefined head. In fact, the travel vendor has a problem that a top can be visited more than once. Edit: Depending on the maximum of 10,000 characters and edges its Not sure about, but I think it is optimal (probably not the most effective idea): Calculate the minimum path between each pair of digits, and then apply the travel vendor to this article.

c# - Comparing dates and show the remainder left til expiry date -

@if (दिनांकटाइम। आज & lt; item2.woucherCampaign.ExpiryDate) {& lt; h3 & gt; समाप्ति: & lt; अवधि शैली = "रंग: # एफएफ 20000" & gt; शेष दिन & lt; / span & gt; & lt; / h3 & gt; } यह अभी मेरा निशान है I मैं आज की तारीख की समाप्ति की तारीख और शेष दिनों के आउटपुट की तुलना करने की कोशिश कर रहा हूं। मुझे अपने एच 3 में शेष दिनों की गणना करने के बारे में पता नहीं चल रहा है। मेरा उदाहरण समाप्त हो जाएगा: 9 सितंबर, 2011 :: 9 दिन शेष। हो सकता है कि डेटटाइम के लिए एक अलग तरीका है जो मदद करेगा। मैं अपना कोड अपने .cshtml के अंदर कर रहा हूं आप घटा सकते हैं DateTime मान, और परिणाम एक टाइमस्पेन मान है। दिन में अंतर प्राप्त करने के लिए आप दिन संपत्ति का उपयोग कर सकते हैं: @ ((item2.voucherCampaign.ExpiryDate - DateTime.Today)। दिन)

sql - How would you modify this trac query to also include due date? -

We have SQL query for the report: as SELECT p.value __color __, as the owner __ group __, ticket in the form of ID, severity, priority, status, summary, component, milestone, T.T.P. As a form of time, change time AG-time, _description as a description, _ reporter ticket as reporter T = T.priority and p.type = 'priority' WHERE status = 'Assign' Or condition = 'new' order by owner, P.View, T. type, time We need to add another column to it: mm / dd / yy format duedate duedate is a field coming from a custom field plugin You have to support it How do I modify this query? First of all, to recover your duedate values, include another , but this time the ticket_custom TC DB table, where all the custom ticket field values ​​remain. But it has already been explained in detail. Second, custom field values ​​can not be reformatted on-the-fly, which is especially true for the date / time zone. Again there is more details available in the above ques...

jquery - How can I change the css class of each th tag from “T” to “ST”? And how can I assign 1 more function(PI) to the button of the last table of iframe(A) -

I have an IFrame that contains the following HTML that is empty when I load a page & lt; Iframe id = "a" & gt; & Lt; / Iframe & gt; I am using the javascript iframe (a) with the following code: document.getElementById (A) .src = ' Https: // adms.lifemark.ca/Apps/app_quickadd_frame.jsp?appid=102946&oppid='+Current; After loading iframe (A) it creates 10 iframe within iframe (a). Each new iframe has 1 table and several th tags. How can I change the CSS class of each tag from a ???? Tâ ???? for ? & lt; Table & gt; And how can I provide another function (PI) to the following button under the last table of iframe (A)? & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td class = "submit" & gt; & Lt; Input type = "button" value = "submit" onclick = "sb ()" style = "width: 200px" & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; ...

layout - android get drawable area in onCreate method -

If I have height and width layout with height_parent, then on its purchase method to get its height and width Any way? If not, its dimensions are available? I need this because I have to add some ideas in runtime and I should know how many scenes fill in the layout. You can:. Assume that you have layout view in the Create Method layout.post {new Runnabel} {@Override Public runs zero () {height = getHeight (); Width = getWidth (); // Now adopt other ideas that you know the size of the parents}}});

PHP Redirect, Keep POSTs -

I have an html page with a checkbox form. The API has a PHP script to implement in the form. PHP scripts collect POST variables OK but clearly a blank screen display because it goes to execute www.example / script.php once. header .. How can I collect that data in POST and then can I attach the attached script to any other form automatically with PHP's activity on any other form? Thank you and sorry if I do this in a misleading way You can store variables in $ _ POST in the $ _ session and then submit when the last part of the form is completed or you can hide these values ​​as information And can store them on the final page.

How do I make my custom android IME show up in the IME menu? -

I wrote a simple test IME for Android and installed it on the device. I've confirmed that the service is browsing on the service device by browsing the list of services. However, is not visible in the list of available keyboards in the service language & amp; In the input menu I am using Android 3.2 on an ASUS TF101. This is my service announcement & lt; Service android: name = "keyboard" android: permission = "android.permission .BIND_INPUT_METHOD" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.view.InputMethod" & gt; & Lt; / Action> & Lt; / Intent-Filter & gt; & Lt; / Services & gt; Android SDK has an example of a soft keyboard. And this link can help you

Input mysql string and escaping issue within codeigniter -

I am using codeigniter and inputting some data from RSS feeds. Codeigniter does not seem to run away from itself, there are two examples below, no idea why am I facing this problem? // Event 1 Basic input text fuel one ?? º is a simple, MySQL data fuel is a simple, What is php fuel ?? à ¢ ?? ¬ÂºÃ ?? A simple, // event 2 reads as I'm looking at a new mouse ... Basic Input I have a new mouse & amp; # 8230; On MySQL data I am looking for a new mouse & lt; Here is a line break & gt; I am searching for a new mouse at "Post-text" itemprop = "text"> So it makes me feel a little dog by answering my own question, but I think that anyone else has this useful in case of this problem Could. In the main section of HTML, I & lt; Meta charset = "UTF-8" & gt; Never knew that this was important ... Then I wonder why the html unit does not display correctly in mysql It was revealed that it does not s...

php - How can I separate the callback logic in the one single file using codeigniter? -

I use config.php to store all form_validation rules ... but I have to callback the function in one I would like to store a single file too, how can I do this? any idea? Thank you .... Now my file is something like this: User Controller has several customized callback_with the user controller, but I'll configure the config. Run all the rules in php. I want to insert _valid callback to a class. Thank you. By default, Form_validation lib $ CI property to use it Uses callback method. Usually it looks on the current controller. However, you can change this behavior by increasing the accreditation class and by changing the run () method. MY_Form_validation Expands CI_Form_validation {/ ** * Support for verification callback Object to run callback from any object * * @access public * @param object * @param string Is there any validation rule to reach the URI? * Returning Bull validation status * / Function run ($ obj = '', $ group = '') {// Callback objec...

registration - PHP register form strange error -

I have an image hosting website, and my registration form is not working, every time I click on the second area Let's speed up to return to the first field instantly, this is actually a pain in B * M, because people can understand the language, if someone knows what is going on, then I really helped Thank you, thank you. Oh my register form is located here - Try wrapping the table of the file & lt; Form method = "post" action = "register.php" name = "myForm" & gt; Just insert it before the tag. Change the user name field to something else & lt; Input type = "text" maximum length = 30 size = 30 name = "username" & gt; // change name = "username" & lt; Input type = "text" maxlength = 30 size = 30 name = "_ user _ _" & gt; This page already has a field named "UserName" - the area of ​​your hosting website

c++ - How do I return from a function inside a lambda? -

To determine whether there is an element in a category, consider the following toy code: template & lt; Tyname Iter, Typing Named ATC; Bool contains1 (Iter start, Iter end, const T & x) {for (start! = End; ++ start) {if (* begin == x) true; } return false; } (Yes, I know, the standard library already has fine algorithms, it is not.) How do I for_each and lambda? The following does not work ... template & lt; Typename iter, typename T & gt; Bool contains2 (Iter start, Iter end, const T & x) {std :: for_each (start, end, [& amp; x] (CONST T & amp;); if (x == y) return true;} ); return false; } ... because it will only return from Lambda, not from the function. Do I have to throw an exception to get out of Lambda? Then, maybe this might be a dozen better solutions to this specific problem, which does not include Lambadas at all, but this is not what I am asking for. How do I write the same thing with for_each and lambda ? Can y...