Posts

Showing posts from March, 2011

sql - Rank/Rownumber function in SSIS Dataflow -

Image
In my dataflow, after some lookup I'll get duplicate customer records (they are not exact duplicates, only customer ID), Based on some characteristics of customers like the city, location. I have to choose a record between them. How can I get it into an SSIS database? Here is sample data: ; (Customer ID, cutomer_name, score) (select 1 as the Customer ID, select 'ABC' as cutomer_name, score union as 100, 1 'ABD', tap union selection 1, 'ABD ', 20) Select * From Customer From here I have to select the record with the lowest score and only send that line to the last line. It is easy to get it from the Rumah Festival in SQL, but this case occurs during the dataflow in SSIS Enter the source data access mode on the SQL command.

php - Accessing Multidimensional stdClass array in Codeigniter -

I think that's a special case I think my array is so far away that traditional to reach a stdClass Ways are not working. Before anyone postes me on this subject (which are many), I ding for not checking that I want to post that I have examined almost all of them and here There are some links to prove this. I have read them all. I have tried all the suggestions to access the data. None of them are working for the day My data is formatted in this form: child :: __set_state (array ('id' = & gt; ; NULL, 'code' = & gt; NULL, 'accld' = & gt; NULL, 'fname' = & gt; null, 'mname' = & gt; null, 'lname' = & gt; null, 'gender '= & Gt; Faucet,' dub '= & gt; Faucet,' class '= & gt; zero', 'picture' => Faucet, 'allergy' => Faucet, '0' => ; StdClass :: __set_state (array ('id' = & gt; '1039', 'zero' 'code' ...

javascript - How to Call Method of ModelB.js from within ModelA.js? -

I am working with loopback 2.0. I generated my model with generator and added a JS How can I call a method from ModelA within ModelB? Example Folder structure: / General / Model Car.json Car.js Engine.json Engine.js. .. Car.js: module.exports = function (car) {Car.drive = function (destination) , Fn) {...} ...}; Engines. Js: Module Exports = Function (Engines) {Engines} They have some = function (some, Fn) {// This is the place where I need Car.js var Loopback = (a 'loopback') to open a method Want to Var car = loopback Models.ccar; car. Druze ('49 .1234, 12.1234 ', FN); // ***} ...}; model property such as engine App to provide access to other models, for example: module.exports = function (engine) {Engine.doSomething = function (something, fn ) {// *** This is where I want to call a method from Car.js var car = Engine.app.models.Car; car. Druze ('49 .1234, 12.1234 ', FN); // ***} ...};

image processing - How to detect spiral optical flow using matlab? -

Image
I have a huge whirlpool video, which is similar to the image below Can someone give algorithms / codes to detect spiral optical flows? Is it possible that a spiral curve based on spiral optical flow is fit? You can calculate the optical flow by using the View in the Computer Vision System Toolbox. Optical flow is the spiral in determining the object, what is the matter, that its project is being rooted. The optical flow constantly takes a pair of frames, and you strive to describe its speed from a vector frame 1 on every pixel to 2 frames. You do not care about the speed of each pixel you can track a sparse set of points with time using vision.PointTracker . Edit: If your computer is the latest version of the Vision System toolbox, try new optical flow functions: opticalFlowHS , OpticalFlowLK , opticalflowkidog , and optical flowfoneback .

java - Ubuntu Tomcat showing different user and group for war and extracted context -

I am deploying a war file in Amazon EC2. I am logged in as user Ubuntu and deploying war files as the same file. After deploying the war, I am starting the service "Biscuit" from Root. Now the extracted reference is visible to users and groups as tomcat7 Can any body fix this to me? I want to fix this because I want to use / home / ubuntu, but as the user is showing Tometat, I am going to / home / ubuntu I am getting a permission error when trying to write a file For this solution, I think that the other user is only going to the folder / home / ubuntu example: # other user allowed to read / home / ubuntu only Let's recursively chmod -R o + r / home / ubuntu or if you have access to /etc/init.d/tomcat , then Find TOMCAT_USER and change it to your favorite Ubuntu user name

android - How to achieve text over semitransparent image on a button -

I am trying to write the text above the image on my image button. I am looking around the internet and I know that you can not set the imagebutton text. Everyone suggests that I use a button instead and set its background, but they ignore the fact that if I do this, the button is going to be a clickable image (I am a The image is to be dragged above the Android button image, not just an image) Is there any other way to do this? I would also like to avoid framelay if possible. Framelay is the best way to do this. This code should be done Android: Frame_Loutout Android: Layout_wind = "wrap-content" Android: layout_height = "wrap_content" Android: background = "something else" & gt; & Lt; Android: Eddie = "@ + ID / Button 1" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "button" Android: background = "somewhat" /> & Lt; / FrameLayout...

php - How to handle two submit buttons in my form -

I am trying to create two submit buttons in my form My question is, which button does the user click on my test.php page? You have to add the name attribute to your button & lt; Button class = "BTN BTN-Priority" type = "submit" name = "old" value = "old" & gt; First button & Lt; / Button & gt; & Lt; Button class = "btn btn-primary" type = "submit" name = "new" value = "new" & gt; The second button & lt; / Button & gt; The PHP code using will look like this: if ($ _SERVER ['REQUEST_METHOD'] === 'POST') {// Some related Question: If (isset ($ _ POST ['old'])) {// old} elseif (isset ($ _ POST ['new']) {// new}} Related Questions:

I need to find latitudes and longitudes for companies that have a value of 0 based on zip code in Microsoft Excel using VBA -

I have a master sheet with all the zip codes and each zip code has related latitude and longitude. A ???? B. A???? CA???? D â ???? A ???? 20812 one 38.96837 one-77.14141 one ???? A ???? 20813 One 38.96451 One-77.0878 9 One ???? A ???? 20814 A 39.00824 A-77.0 9 76 One ???? A ???? 20815 a 38.98761 an -77.06 9 6 a ???? But pastestate already has some values, prefilled. A ???? D â ???? E F ???? A ???? 20812 one 38.96837 one-77.14141 one ???? A ???? 20813 A 0 A ???? 0 one ???? A ???? 20814 A 39.00824 A-77.0 9 76 One ???? A ???? 20815 a 0 a ???? 0 one ???? Paste sheet already has data about zip latitude and long time but in some places latitude and long time, 0 already exists. The code needs to be implemented to change: Repeat and paste through the paste sheet. when If you are facing a 0, then compare zipper with pastestate to masterstreet If the match is found, copy the values ​​of the late and make a long time in the pastestate with the master And l...

eclipse - I want java to create a new file with ...new PrintStream... it all works fine, but I can't find the file in my project -

I have a simple code similar to a digital math test (though only 1 question). I want to scan the program in the input window and want the result to print whether I was right or wrong in a new text file. The problem is that I can not accept the eclipse in my project, instead I want to do my projects Find the folder and get the .txt file instead. Is it possible to show the .txt file inside my project in Extensions? Thanks! ... Also, how do you put quotation marks inside quotation marks in Java? I mean "you answered" 500 "". Package default; Import java.io.file; Import java.io.phileNotFoundException; Import java.io.PrintStream; Import java.util.Scanner; Public class mathstest {public static zero principal (string array []) filenoutfound exception {string Senate = "270"; String X; Printstream file = new printstream (new file ("test result. Txt")); Scanner scan = new scanner (System.in); System.out.println ("This is an exam, please answer ...

running a python script with values from views.py in Django -

I wrote in another example Python in the views.py file that I wrote, but I do not know that How to do. See myname_first.get ('username') password = username.password.exe ('username') password = view_alarm_settings (request): if request.method == 'POST': username = Request.POST.get ('password' ) Alarm = Alarm.Objects. () [0]. Alarm_setting response = htprespacection (alarm, content_type = 'text / plain') response_a = execfile ('alarm_file_') return response_a I'm trying to respond in alarm_file.py Anyone have to do this? According to the comment, make the function in alarm_file.py and import it. Do the same to call Python alarm_file.py , use if __name__ == '__main __': is an alarm_file.py. It will include the argument to run when called python alarm_file.py . In addition, you can use sys.argv to get the logic passed in the command line. For example: alarm_file.py: import sys def do_something (val): # Some...

javascript - Bulk REST API POST Processing -

I am migrating 40,000 records from one system to another, and the only way to import data into the received system is to be API Post Call I'm looking for advice on the fastest approach to repetition through 40,000 Easy API calls. I have data formatted as JSON, and I assign objects to 40+ In JSON files are selected using PHP. Ideally, I would probably like to handle POST asynchronous, PHP, Javascript, node. Any advice on how to use JS or Bash would be very helpful. You can post calls with PHP with multiple functions of curl. Comments in code. $ Json_files = array ('1.json', '2.json', ..., '40 .json '); $ count = 0; foreign currency ($ json_files $ json_file) {$ list_of_objects = json_decode (file_get_contents ( $ Json_file), true (; $ List_of_objects) {// log error is continuing;} // size 10 part of the arrays / or whatever # you run $ chunked_list = array_chunk ($ list_of_objects, 10) together Want; foreign currency ($ chunked_list $ as Chuck) {$...

amqp - RabbitMQ: What is the default x-message-ttl value -

I could not find in the RabbitMQ documentation, the default x-message-ttl value comes with installation. I know how it has been set in a desired value but I am eager to know the default value. argument set by default from a broker party x-message-ttl , So basically you can interpret the default value as infinite value. If you publish the message without TTL in the queue, the TTL set (without the yup, per-message and per-line TTL arguments, see note below): If the message published in the form of continuous message and continuous message will remain in the queue, the quota will not be consumed; If the message has not been published continuously or the queue has not been declared as continuous, then the message will remain in the queue until it can not be cut or the broker is reinstated. Can not start. TTL Note: When both TTL Set Brokers per per line and the per-line use the minimum valay. For example, if the per-message TTL is 10000 (10 second) and per-queue...

html - How to make scalable web pages -

I have noticed that pages like netflix.com and youtube.com are displayed on a 1024 px iPad because they are 1 Do 9 00 px monitor on In both cases, all the material is displayed. Nothing is ever cut This means that HTML, or Javascript, understands the width of the screen and then scales everything in the size if the original size is 1400px For example, and the page has been loaded into the 1024px screen, everything is increased from 73% to include fonts How is this done? It is called, and the most common is using the method of doing this. Therefore the page is not "scale", but is designed to take advantage of additional space and the limits of consumer device are to be deemed to be trivial.

osx - "SyntaxError: Non-ASCII character" in running Python code -

I am starting with Python and when I use interpreter and run this code: & gt; ; & Gt; Peliculus = ["Movie 1", "Movie 2", "Movie 3", "Movie 4"]> gt; & Gt; Print (Pelicus [1]) When I use the Piccard IDE it does not compile: Peliculus = ["Movie 1", "Movie This output is: file "/ user / 2/3", "movie 3", "movie 4"] print (pelikulus [1]) User / Picarc Project / Crooked / Pratt B2 "", Line 1 Syntax Error: Non-ASCII Characters '\ xc3' File / User / User / PycharmProjects / Untitled / Prueba2.py on line 1, but no encoding declares; What is wrong in Python? .. Do I set it up correctly? This file is an encoding problem Try adding it to the beginning of the file: # code = utf-8

c++ - OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND -

I'm having trouble trying my CMC to see my OpenCV, I have installed OpenCV and run some sample problems. And some give the same error, such as I find in my connector file (when running a sample program through the terminal) I have tried to make the environment environment variable path my bashrc file now looks like CMAKE_PREFIX_PATH = / home / Durham / desktop / OpenCV / opencv-2.4.9: $ CMAKE_PREFIX_PATH CPATH = / home / Durham / desktop / OpenCV / are opencv-2.4.9 / include: $ CPATH LD_LIBRARY_PATH = / home / Durham / desktop / OpenCV / opencv-2.4.9 / lib: $ LD_LIBRARY_PATH pATH = / home / Durham / desktop / OpenCV / opencv-2.4.9bin: $ PKG_CONFIG_PATH path = / home / Durham / desktop / OpenCV / Opencv -2.4.9 / lib / pkgconfig: $ PKG_CONFIG_PATH PYTHONPATH = / home / Durham / desktop / OpenCV / opencv-2.4.9 / lib / python2.7 / district packages: $ PYTHONPATH And are the contents of /etc/ld.so.conf contains / etc / ld.so.conf.d / *. Conf /home/durham/Desktop/OpenCV/o...

ios - iAd in UITableViewController -

I have a UITableViewController that I want to add iAds. I want to show the ad all the time at the bottom of the screen. I have answered here: and have achieved this behavior. However, the ad is hidden in the beginning and only when the user scrolls the table. When the screen is loading, how can the ad not only appear at the bottom of the ad screen when the user scrolls? To show ads when the view is visible, I add the banner view to the viewerhandpier - (zero) viewDeadPower: (BOOL) animated {[Super Viewed Up: Animated]; _myIAD = [[AutoApplider] IIAD]; If (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPhone) {// iPhone code if ([UIApplication sharedApplication] .statusBarOrientation == UIInterfaceOrientationPortrait || [UIApplication sharedApplication] .statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown) {if (floor (NSFoundationVersionNumber) & lt; = NSFoundationVersionNumber_iOS_6_1) {_myIAD.frame = CGRectMake (0, _myTableView.frame.size.height - 50, 32...

Sitecore Glass create not creating correct template type -

I'm seeing a weird gesture with the latest version of Sitecore Glass and Sitorac 7.2 7.2 latest rev. I have a fu class, on which base base is the base class, wired up to the sitecore template using both the glass features. When I use glass to insert a new item in Situor, it is using a basetime template instead of FO, an item is already in the folder in which I am adding the item. Has anyone experienced this problem? I added some code to help. This was a bug in the glass. Mapper has decided to make a decision which is being made at this time. When downloaded glasses. Mapperper 3.0.12.24 and Glass. Mapperper SC 3.2.1.40.

ios - Blast Radius Spritekit -

I am trying to create an explosion, when a certain object is killed, the object in the nearest radius will also be destroyed Go. For example, in a brick breaker game, the ball hits a brick and then the brick bursts, as well as two bricks in every direction. How can this be accomplished? Any help is appreciated. There are so many ways to do this, but to make the path of spritekit is an explosion Phantom node you SKAction You can animate it as needed and use the same Spritekit physics contact logic with other sprites. Add Physical Science Contact Category Bit Masks to Explode Nodes. When an event occurs, then the explosion should arise, call a method that creates an explosion node at the point of occurrence. Set the explosion node state at the point Add any function to the explosion node. Add explosion node to the view. Its functions will be running in Physics Contact Representative method, didBeginContact: You test for the contact of any node of those categories that should ...

html - Icon Fonts Not Vertically Centered With Text -

Image
I am using icon fonts in a nav list and I have text in two The icon problem is that the mouse and the text do not match well. The icon area is apparently more than the text, when they are both on the baseline, the icons are too much, is there any solution i span Can I use text in ? I tried to adjust every parameter that I know: HTML: & lt; Nav class = "nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; Span data-icon = "& # xE603;" & Gt; & Lt; / Span & gt; & Lt; H2 & gt; Home & lt; / H2 & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; P & gt; ICON font FTW & lt; / P & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Span data-icon = "& # xE603;" & Gt; & Lt; / Span & gt; & Lt; H2 & gt; ABOUT & lt; / H2 & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Span data-mark = "& amp; # xE603;" & ...

iphone - Is It Possible to Get SFT from FFT? -

I use the Auriotouch sample program to generate FFT data to gain frequency and magnitude. Is there any easy way to get SFT from FFT? If the SFT gives you DFT (discrete) fourier a finite vector or evenly distributed audio sample values Of the array), it is similar to FFT calculation (plus or minus some small numerical goal difference) of the same sample vector.

Android: Navigation drawer auto scroll to top behavior on item selection -

There is no way to prevent navigation drawer list items from going to the top when I select 12 items in the navigation drawer menu In which the scrollview has been applied because it will definitely be necessary, I have selected item 3 in the position, takes that position on that screen and hides the above items and if the items I see above always scroll down to me Do it How to get rid of this auto-scroll behavior ride on the item selection. I actually listened with a switch statement that I was doing to mDrawerList.setSelection (status) Setting the property; So I just commented on this line and everything is fine.

ios - Best practices for detecting when "user is typing" for chat functionalities? -

I am currently using PubNub to handle real-time aspects of chat and a PNChannel state when a user is typing or typing is completed. My question relates to the client side how something like isTyping can be measured as there is a time limit between each tap on the screen keyboard, so that I was wondering if there is a "best practice" method that is to measure time interval between the tap of the screen, to understand whether a user is typing or not (for example, a slow typer Versus a sharp turn V) versus when the user has stopped typing in fact? Thank you! You can see in these - (zero) textFieldDidBeginEditing : (UITextField *) sender / method fire when you start typing some text in the field of text - (BOOL) textFieldShouldReturn: (UITextField *) textField // method whenever it typed anything in the field of a text- Characters Returns the returns according to - (zero) textFieldDidEndEditing: (UITextField *) Sender // When you type stuff in a text field Ho...

POST request via requests (python) not returning data -

There is one more question about my post. This post should be the same referenced on the stack overflow by using 'request.post' to post multipart form data by Python ', but for some reason I can not work it's website I posted a file I want to do that which is already in FastAffate on this website and using the requests in Python, select the 'SVM' option. It is based on the fact that @NorthCat had given me first, which used to work as a magic: import request import urlib file = {'file' :( open ('bishop / newdenovo2 .txt ',' R ') Read ())} url =' http://www.camp.bicnirrh.res.in/predict/hii.php 'payload = {"algo []": "svm"} Raw = urllib.urlencode (payload) response = session.post (url, files = file, data = payload) print (response.text) Since it is not working, It was felt that the payload problem was I was playing with Payload, but I can not get it for any of these works. payload = {'S1': stra...

github - How do I connect a COPY (an archive, not a clone) of a git repository to its remote? -

I want to know how to connect a copy of a GIT repo (a collection, not a clone) and sync with it Remote repo Background: I have a local and remote repository. I can zip my local store using GIT archive and then copy it to a server: $ Git archive --format = tar HEAD | Jizip & gt; Myarchive.tar.gz Question: After unzipping the archive on the server, how do I re-connect and sync the server copy to the remote repository? If I do this: $ git init $ git Add Remote Origin git@github.com/myusername: reponame.git bring $ git original GIT status still reports everything is unheard of What am I doing that my unzipped folder completely syncs with remote repo, and So can I reduce any future remote repo? Do not do one collection: / Strong>: This will give you a file, except you will be able to drag it from once copied to the remote location. "/ p> This bundle may also be incremental (see also" "). You do not have to copy the full repo, Only ...

ios - SKAction: how to generate a random delay in generation of nodes -

I use the following part of the code to generate SKNodes from time to time to make these encodes random There is a way to make a duration. In particular, how do I create "delayFish" in the following code, which can be an action with a random delay? ObjC: ago Set the average delay and range ... #define kAverageDelay 2.0 #define kDelayRange 1.0 // plus or minus 0.5 seconds varies depending on And then change your delay on this action ... SKAction * delayFish = [SKAction waitForDuration: kAverageDelay withRange: kDelayRange]; Swift: Set the average delay and range first ... Average Avg Give: Range with TimeInterval = 2.0 delay: Time difference = 1.0 // Plus or minus varies with 0.5 seconds And then change your delayFish action to ... delay file = SKAction.wait (forDuration: average middle, range: range)

Convert PDF portrait to image landscape using Imagemagick and PHP -

I want to convert a series of PDF to PDF, while the PDF is the picture and the PNG file scenario is ImageMagick. I received a PNG prototype (attached code below) conversion from PDF illustration. But with no distortion, there is no idea how to make a picture picture, (not to rotate the image) Can someone help me? Thank you. $ infile = $ direcory "/ Test.pdf"; $ Picture = new imagic (); $ Bodercolor = New Imagic Pixel ("White"); $ Images- & gt; Centrology (220, 220); $ Images & gt; Readimage ($ infile); $ Images & gt; Setimageformat ("png"); Forex Currency ($ i => $ Picture as Image $) {// Set Backgraud Color = White $ Image- & gt; Set sizeborder color ($ bodercolor); $ Image- & gt; Limit range ($ bodercolor, 0, 0); $ Image & gt; Writeimage (. $ Direcory "/ test-pg" $ i "png." ..); } $ Images- & gt; clear (); $ Images & gt; Destroyed (); In fact, what I want will rotate the vertical page with ...

Inverse relation in realm -

We accept two tables, box and items . There are many items in the box, one item contains only one box. I would like to get all those items which are in the array given in the box. How could I do that? In the CD I can do it in the item category from the predicate and property which stands for the connection to the box. I am using version 0.81 update (10-27- 2014) Bidirectional links are now supported. See the scope document: Original Answer Bidirectional relations should be explicitly added at this time. Here's an example: @ square box; @Inteface Item: RLM Object @ Property Box * Box; @ And RLM_ARRAITYEPE (item); @ Interface box: RLM object @ property RLMRRA & lt; Items & gt; * item; @end ... item * items = [[item alloc] init]; Box * box = [[Box Alok] initWithObject: @ [@ [item]]]; Item.box = box; We have planned to simplify this method in the future. This answer

asp.net mvc - All the model values are displayed in the URL, is this normal? -

मेरे पास निम्न कार्यवाही विधि है: सार्वजनिक कार्यप्रणालीउपयोगकर्ताविवरण (कर्मचारी ईएमपी) {वापसी देखें (देखेंनाम: "कर्मचारी दृश्य", मॉडल: एएमपी); } यह तरीका कर्मचारी विवरण प्रदर्शित करना है। कर्मचारी वर्ग में दर्जनों गुण हैं मेरी समस्या यह है कि सभी प्रॉपर्टी मान यूआरएल में इस तरह प्रदर्शित होते हैं: http://mymvcapp.com/Employees/ViewEmployeeDetails?DocID=1&EditDate=07%2F25%2F2014% 2011% 3A00% 3A43 & amp; IdSerial = AZE & amp; IdNo = 09,270,599 & amp; अंतिम नाम = अब्दुल्लायेव & amp; FirstName = Mikayil & amp; बाप का नाम = Cavanshir & amp; पता = मीर% 20C% C9% 99lal% 20k% C3% ई.पू.% C3% ए 7% C9% 99si% 2059% 20K% 2C% 20,451 & amp; पता 2 = दा% सी 4% 9Fl% सी 4% B1q% 20k% C3% ई.पू.% C3% ए 7% C9% 99si% 2022A & amp; लिंग = नर & amp; NationalityID = 1 & amp; JobDescription = एक% सी 4% B0ST% 20Qrup% 20MMC & amp; SocialStatus = नौकर & amp; SocialCategory = Disabled1 & amp; फ़ोन = 994,503,335,553 & amp; ईमेल = mikayi...

osx - Access context menu items by name using AppleScript -

I'm trying to use Apple script to click context menu items in logic pro, just click on menu Item by providing name It seems that this should be possible because I am able to provide keyboard shortcuts for these reference menu items and the name of the command using system preferences. For example, if you right click on the main edit window in the logic, then a menu pops up with an option called "Add audio file" ... "If I create a system priority keyboard shortcut for logic and Let it be the name of this menu item, it is able to execute just fine, I want to recreate it with a script, I can use the hierarchy to reach the normal menu item. I'm familiar with: Specify the procedure "Logic Pro" Show the menu bar 1 menu bar item "file" tell menu Click on the "file" menu menu item "save" But as far as I know, there is no way to access the context menu (right click menu), which I want in this way. It seems that after the s...

Jenkins Copy to slave plugin is over writing all the files -

I have Jenkins for automation script and we have 1 Jenkins server and 5 different slaves. What do I want to do? I want to copy all the files to the main server which is the master machine after every run. I have checked the copy to the slave plugin but with the new build it is copying the existing HTML report every time. But we want to report all test HTML according to the days. I have to go to the slave machine to confirm it. (Testresults / results.html) Please help me copy every HTML report every time. You may use the action that was posted to "store artwork". In this way, you will be able to see the last test from slaves on the master copy build.

node.js - Express is not showing any params being received from a POST request -

In the node, I'm using express.router () to get the curl request. I just want to make a "hello world" and log whatever I have received My curl request: curl -F "hello_world = foobar" http : // Examplesite.com/my_endpoint How the node handles it: var express = require ('express'); Var router = express.routor (); Router.route ('/ my_endpoint') .post (function (req, res) {var data = req.body; console.log (data); // This comes back empty ... Is this "Hello_world = Fubar"? }); Rex. There is no naturally present within an express-app, for this, you need express-body-parser middleware with it: install npm body-parser - Save After that, you can easily add it to your app: var Express = Expected ('Express'); Var bodyParser = is required ('body-parser'); Var app = express (); // Instantiate an Express App app Use (bodyParser.urlencoded ({extended: incorrect})); // parse app / x-www-form-urlcode app. (B...

Android. Webview. Show part of page using Javascript -

Image
I want to show the section of the page: the web form that will be filled by the user, the reason is that the web form is inside this tag : In Java, I Trying to get the form from the name of the class (because the class name is only a tag with the "form"). Then I'm trying to change the content of the "form" content (maybe I'm doing this wrong) then try to show the content (form only) in the webview the last WebView webview = ( WebView) view.findViewById (R.id.wvCheckInn). Webview.getSettings () setJavaScriptEnabled (true). Webview.setWebViewClient (New WebViewClient () {@Override Public Zero onPageFinished (WebView to view, string URL) {string javascript = "javascript: on form = document.getElementsByClassName ('form'); body = document on" + " GetElementsByTagName ('body'); "+" body.innerHTML = form.innerHTML; "; view.loadUrl (javascript);}}); Webview.loadUrl ("http://businessinfo.uz/service/inn...

AngularJS directive template doesn't get compiled -

I am trying to create a conable multi-selected custom command: a model with a list of options with the checkbox I use a separate area. However, the directive template has been added in such a way, after many research and thinking, angular expressions are not interpreted, I still do not know what I am doing because it A very basic It is > (Model: '= ngmodel', option: '=' 'F' copy: ' test '+' & Lt; div class = "model" ng-show = "open"> gt; '' ' gt;' + 'button type = "button" class = "Close" ng-click = "open = wrong"> a ???? button & gt; '+' & lt; h3 & gt; {{Title}} & lt; / h3 & Gt; '+' & lt; / div & gt; '+' "+' End-modeal body - & # 39; & # 39; & # 39; & lt; div class = "modal-footer" & gt; '+' & lt; div class = "control" & gt; '+' &...

jquery - Print exception in Ajax thrown from PHP -

I am trying to request a post using ajax URL. My JS / JQuery code looks like this var params = {'username': 'eddard.stark@got.com', 'name': 'Edward Stark'}; $ .post ("/ user / add", parameter, function (data) {// no error user user = eval ('(' + + data + ')); $ ("# spanId"). Html (" User ID "+ user.id); // here- http://stackoverflow.com/questions/16472116/ajax-error-cannot-catch-thrown-exception-from-php // It is saying that it handled it here Can be / error 5xx: server side errors (such as DB failure) $ ("#"). (Error: status) (error, status) {// error 4xx: client side errors (such as controller / action does not exist) / Error 5xx: SpanId ") .html (" erro R "+ err;;}) always (function () {$ (elm) .hide (); $ ('# spanId'). Show ();}); / user / add php code for action add function () {$ username = null; $ Name = null; if (isset ($ _ POST ['name ']) {$ Name (e...

How to check via javascript/jquery how user moved to page? -

इस सवाल का पहले से ही एक उत्तर है: 7 जवाब जावास्क्रिप्ट / Jquery कि उपयोगकर्ता 'वापस' बटन या 'ताज़ा' पृष्ठ के माध्यम से पेज पर ले जाया गया है? = "post-text" itemprop = "text"> jQuery (दस्तावेज़) .ready (फ़ंक्शन ($) {if (window.history & amp; window.history.pushState) {window.history.pushState ('अग्रेषित', 'Null,' ./#forward '); $ (विंडो ) .on ('popstate', फ़ंक्शन () {चेतावनी ('वापस बटन दबाया गया था।');});}});

linux - Setting and getting environment variables by "source" a shell script from Java code -

I'am is writing a Java console application that takes input parameters from the environment variable (linux). To set these variables, my application can "script" open script "source" source of script with "I Runtime.exec () or ProcessBuilder, but I do not know how to reach the created environment variable Receive my shell script (set_env.sh): #! / Bin / csh setenv MY_DB DB_NAME To code the "script" above the Java code: ProcessBuilder pb = new process builder ("csh", "-c", "'source set_env.sh' '); Process P = not ; Try {p = pb.start (); p.waitFor ();} hold (IOException | paused exception e) {e.printStackTrace ();} I created MY_DB variable How can I gain access or any other solution to my problem? Any help would be greatly appreciated. Thank you very much. OK friends, your answer Thanks for the help of my temporary solution I have written another script which creates "source" and t...

symfony form collection customization -

Image
मैंने संग्रह का उपयोग करके सिम्फनी बनाई है & lt; fieldet & gt; & Lt; किंवदंती & gt; {{'टिप्पणियां' | ​​ट्रांस}}: & lt; / किंवदंती & gt; {{Form_start (फ़ॉर्म)}} & lt; तालिका & gt; & LT; tbody & gt; & LT; टीआर & gt; & Lt; td & gt; {{form_label (form.category)}} & lt; / td & gt; & Lt; td & gt; {{form_widget (form.category)}} & lt; / td & gt; & Lt; / टीआर & gt; & Lt; tr & gt; & lt; td colspan = "2" & gt; {{form_errors (form.category)}} & lt; / td & gt; & lt; / tr & gt; & Lt; tr & gt; & lt; td colspan = "2" & gt; {{form_label (form.comment)}} & lt; / td & gt; & lt; / tr & gt; & Lt; tr & gt; & lt; td colspan = "2" & gt; {{form_widget (form.comment)}} & lt; / td & gt; & lt; / tr & gt; & Lt; tr & gt; & lt; td colspan = "2" & gt; {{form_errors ...

How to launch Alarm application in Android devices -

As the headline: How to launch alarm application in Android device? What should be the intent? What do you need from documentation here are examples that they use. Create a public zero alarm (string message, int hour, int minute) {intention intended = new intent (alarmclock.action_SEEALarm). InputAxtra (alarmclock.xtra_mmsEag, message) PutExtra (AlarmClock.EXTRA_HOUR, hour). Input extras (alarm clock.xtamine, minute); If (intent.resolveActivity (getPackageManager ())! = Null {startActivity};}}

let rpm %patch not use default --fuzz=0 option -

I got an error in the L6 machine as the following: Patch # 4 ( Test.patch): + / bin / cat / path / tate / test. Patch + / USR / bin / Patch-S-P-Fuse = 0 out of 4 shanty failed - cancel saving file *** 1 out of 1 Hunk FAILED - saving *** rejecting the error file Poor exit status from /var/tmp/rpm-tmp.YERtKr (% PReP): However, I patch the file with the following as the following: / usr / bin / patch -s -p0 & lt; /path/to/test.patch . I think the RPM set - fuzz = 0 is by default to rpm as - fuzz = 0 option From there is no way to set to: try to make sure That matches your patch reference. The default "FEZ" value is "0", which requires exact match. You can work around it by adding % global _default_patch_fuzz 2 to bring back the value found in earlier versions of older RPMs in Fedora, but it is generally recommended to avoid doing this. .

javascript - How do I prevent the user from viewing a response from an AJAX request? -

I would like to create a secure AJAX call and response from the client and server. I like this with a encryptor method and routing would encrypt the AJAX request url: "/ site / web / J + CVKhtwFK9VwSZYiza8zr8YUqWK62VSkobVfgB3 + 1s =" and it is properly rendered. / P> I'm concerned he does, when I Ajeaks call on the server and the response I withdraw myself, so I can be in the 'network' in Google Chrome, do observe the response and I can see it. In this way: { "d": { "__ type": "unproject.Services.Services + retvalMessage", "retval": "1", "message": "ok" }} How can I encrypt this response or prevent the user from viewing it? session variable is the key to a client. Sessions encrypted string as your string J + CVKhtwFK9VwSZYiza8zr8YUqWK62VSkobVfgB3 + 1s =. In the AJAX request we can check this URL variable and the session can be used to locate the user login or the probl...

How to get DateTime value from DataRow in C# -

मैं कर्मचारियों के जन्म तिथि को DataRow से डेटाटाबल , लेकिन मुझे अपवाद मिल रहा है: स्ट्रिंग को मान्य दिनांकटाइम के रूप में पहचाना नहीं गया था। कृपया मेरी मदद करो DateTime से DataRow से मूल्य का मूल्य प्राप्त करें निम्नलिखित मेरा कोड है। सूची कर्मचारी सूची = नई सूची (); विदेशी मुद्रा (dt.Rows में DataRow dr) {दिनांकटाईम टी = दिनांकटाम.अब; EmployeeObject.EmployeeID = कन्वर्ट.ToInt64 (dr ["empId"]); EmployeeObject.EmployeeFirstName = कन्वर्ट.ToString (डॉ ["empFirstName"]); EmployeeObject.EmployeeMiddleName = कन्वर्ट.ToString (डॉ ["empMiddleName"]); EmployeeObject.EmployeeListName = कन्वर्ट.ToString (डॉ ["emptLlastName"]); EmployeeObject.EmployeeGenderStr = कन्वर्ट.ToString (डॉ ["empGender"]); EmployeeObject.EmployeeDateOfBirth = कन्वर्ट। ToDateTime (डॉ ["empDOB"]); (";", ""), "मी / डी / याय एचएच: मिमी: एसएस", कल्चर इन्फो। इन्विरिएन्ट कल्चर;) को बदलें / /। / दिनांकटाइम। पर्स (डीआर ...

node.js - Implement facebook style status message system in mongodb -

How can we apply Facebook in Mangode (using Mongoose) like a messaging system, where anyone The user takes the position of his position This should not be a real time, there will be a fresh button to get the latest position. Plan A: Status (collection) ID, user_id Plan B: Status (collection) ID, user_id (reference), status_msg, friends_list [sub-document] Advantages: Speed ​​at high speed With Plan A., Friends will have to loop among all the friends and then get all the positions for me every single friend to do this Will be (page refresh / new login). With Plan B, I only have to get the information of the situation in the Friends_list of current user Would I want to know my opinion and suggestions on this? Is there a better way to deal with this problem? I should also know how I can use the Rabbit MQ here to increase efficiency and reduce unnecessary DB I / O. Believing that each user will have many friends, and these friends have their time limit se...

How to implement typeahead using ionic without bootstarp -

I'm new to ionic and would like to apply a typewriter to display the user list without using bootstrap. with. I was looking for something similar to build an eonic app. I can provide some links that you can see and choose the most suitable for your case. The link has been written that a great tutorial has been written in pure angular. The first two links are those projects that you need to include in your app and then use them as a guide to achieve your goal. Cheers!

c++ - creating a basic dll in metatrader4 -

I am trying to create a basic Hello World DLL using codeblocks and metatrader4 and to do it in a striped version I am trying. My collection Dll and .def in the same dir as the .mq4 file. file in test.mq4 #property Copyright "Copyright 2014, Metacott Software Corp." #property link "http://www.mql5.com" #property Version "1.00" #property Strict // # Import "gimmeDLL.dll" // string defined GetStringValue (string); // # import #import "gimmeDLL.dll" define string GetStringValue (string); #import Start Zero () {GetStringValue (); } In the main CPL of DLL #define WIN32_LEAN_AND_MEAN // Skip rarely used content from Windows headers #include & lt; Windows.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Iostream & gt; using namespace std; # Defined MT4_EXPFUNC __declspec (dllexport) zero MT4_EXPFUNC GetStringValue () {cout & lt; & Lt; "Hello, world...

Uninstall one package from composer without updating everything else -

I have a project that uses musician I want to remove a package (aspect mock in my case) . I compose Removes dependency from Jason and manually deleting all seller packages. Then I run the php composer.phar install . It says that WARNING: The lock file with the latest changes in the composer is not up to date. Jason You can get old reliance, run updates to update them. I do not want this warning, so I run php composer.phar update and it updates all my packages in composer.lock (which we have In SCM). I do not want either to (I just want to delete a package), instead of running composer update , I manually remove the removable package from the composer package. Remove in lock Composer install still gives me this warning. How can I remove a package installed by the composer without updating everything, and without starting the warnings in my workflow? It is said that running no musician actually used Does not update anything in relation to the versions, but what...

RegEx to split formatting string in JavaScript -

I am using a JS Date Library containing a simple asString () formatting syntax eg. . DD MMM yyyy production 01 January 1970. . Unfortunately, the month should be the letter that appears in the formatting string, e.g. 'Date (' 2014-09-01 ') AsString ('dd mmm yyyy') = 01 Sep 9 9 2014 ' It is quite easy to solve; Instead, replace the asString () method to use the format '[DD] [MMM] [YAY]'. Although it comes from the global format string used by other methods. The only way that square brackets are needed is the asString method. 'Yy', 'mmmm', 'mmm', 'mm', 'm', 'dddd' 'ddd', 'dd', 'd', 'hh', 'min', 's']; Automatically [] dd / mm / yyyy = & gt; Unfortunately, RegEx is proving complicated - the result of each code is looping in [[d] [d]] / [[m] [m]] / [[yaani] [yay ]] . So I need help writing this RegEx if this can not be...

php - Many to Many relationships with Laravel / Eloqeunt -

I think I understand the best for the sake of the part, but I still have some difficulties understanding the many relationships . I am preparing a sample database, and hopefully you guys can help me understand it correctly. Table 1: Categories cat_id cat_name Table 2: galleries gallery_id Gallery_name Table 3: Gallery categories cat_id gallery_id So how would I go about my model? I found this topic, but it did not look right. Maybe because I have a little more complicated relationship with this requirement. I think the argument confuses me because I expected that there will be rules for the products, while it would be an example of the words that are being produced. If you can explain this with your sample, then it will give me the related values ​​() and hasMany () the methods and their parameters better Help in understanding the way. I am also confused with some examples that do not take any foreign key parameters thanks alrea...

angularjs - How do I call a Service from my $httpProvider -

I am struggling with all this morning, trying to call a service from my config ($ httpprovider) I have explained to many people that during config, the services are not available yet, I think that, but my service should be called from within the interceptor, which is at runtime. I got a semi-solution that manually injected the service below, but it is not working for me, since it seems that the service is a completely new Example is being made, and I want to use the same example as the whole app (since it stores a message queue) any suggestions? .config (['$ httpProvider', function ($ httpProvider) {$ httpProvider.interceptors.push (function ($ q) {return {'responseError': function (reject) {/ The answer is 300 and above / errors are manually / injected from your service module, because it is not known yet. Config to var $ injector = window.angular.injector (['myServices']) var MessageService = $ Injector .get ('MessageService'); MessageService....

c# - Adding EF object as a foreign key -

OK, I'm pulling my hair on it for a few days. How to insert an object in an object instead of an entirely new object for an existing object? I've tried all kinds of things I'm getting the error "Object object manager has an object with the same key already. ObjectSet Manager can not track many objects with the same key." I am just trying to add a country to an address. Countries are listed in a separate database table, the country comes from a dropdown list posted from the MVC view, so I have only ID, this means that I can get the only way I can query the eF which results in Duplicate object is there. Hope someone can help. Crave! M === More details === The above points only tell the country ID very well to set up, it is only for construction Works Scenes It does not work to edit. I have this in my controller: Edit Public Functionality (SiteViewModel siteViewModel) {if (ModelState.IsValid) {site site = _unitOfWork.SiteRepository.GetById ( Site...

ios - What is error: "NSInvalidArgumentException reason: Application tried to present modal view controller on itself -

When I try to run the app, it crashes me. This is the message I received: 2014-07-25 14:40: 28.116X [13023: 60B] (faucet) 2014-07-25 14:40: 29.113X [13023: 60b] *** Exception of the exception Due to termination of 'NSi Validate Agreement', the reason: 'The application has to present the controller of the Model View Controller trying to present itself on itself & lt; GKHostedAuthenticateViewController: 0x10d625f90 & gt; '*** First Throw Call Stack: (0 CoreFoundation 0x00000001028a1495 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x00000001024e399e objc_exception_throw + 43 2 UIKit 0x0000000101190cdc - [UIViewController presentViewController: withTransition: Completion:] 4100 3 CoreFoundation 0x0000000102896f1c __invoking___ + 140 4 coreFoundation 0x0000000102896dc4 - [NSInvocation called] 308 5 UIKit 0x0000000101181abc - [_ UIDelayedPresentationContext finishDelayedPresentation:] + 201 6 GameCenterUI 0x000000010c97f330 __41- [GKRemoteViewController setupR...

sql - Entity framework vb.net error in translating query -

I am trying to change this query: select the sale . TLL_Sales_Net, sales.TTL_Sales_Target, Units.TTL_Units_Net from epos_Anal_Branch_Sales_Net until epos_PULL_PM_SKU_STATUS is included in the sale. BRANCH_ID = By then BRANCH_ID is included in epos_Anal_Branch_Units_Day units on sale. BRANCH_ID = Units. BRANCH_ID as far as BRANCH_ID = 45 and sales.DATEKEY = 20140725 and units. DATEKEY = 20140725 From SQL to an entity framework query in VB.net I am sending my function to BRANCH_ID and so on DateKey output: dim MyDate string = Date.Now.ToString ("YYYYMMDD") as This is what I have, but it gives not just returns and I am due to the complete loss! This is my question so far, if someone recognizes what I have done, then I will be grateful for a push in the right direction. Property Daily Usenet String Public Property SalesTarget String Public Property ErrorMessages As String Public Share Function GetStoreSales (ByVal BranchID String Form Try the new list (CLS...

bash - Shell script to find the last occurring line ID in a file and add a new one -

मेरे पास निम्न प्रारूप के साथ एक टेक्स्ट फाइल है: एबीसी डीईफ़ ...। .. आईडी = 1 यह प्रविष्टि 1 आईडी = 2 यह प्रविष्टि 2 है ... आईडी = & lt; N & gt; यह प्रविष्टि है & lt; N & gt; Xyz ... मैं लाइन "xyz" से पहले पाठ फ़ाइल में निम्नलिखित नई प्रविष्टि को कैसे सम्मिलित करूँ? आईडी = एन + 1 यह है एंट्री के & lt; एन 1 & gt; मामले को उलझाए रखने के लिए आगे आईडी लाइनें फ़ाइल में क्रम में नहीं हो सकती हैं, इसलिए यह हो सकता है कि आदेश: एबीसी डीईफ़ ... आईडी = 5 आईडी = 2 आईडी = एन ... आईडी = 9 ... xyz (जहां N = 10, सर्वोच्च)। क्या कोई यह पहचानने का तरीका है कि उच्चतम (संख्यात्मक) आईडी लाइन फ़ाइल में है और फिर "xyz" लाइन के समय से पहले एक नई लाइन "आईडी =" जोड़ रहा है? धन्यवाद अग्रिम! एक और तरीका है awk awk -F = '/ id = / { X = $ 2 & gt; x? $ 2: x} एफ एन आर == एनआर {अगली} / xyz / {प्रिंट "आईडी =" एक्स + 1 "\ n यह प्रविष्टि प्रविष्ट है & lt;" x + 1 "& gt;"} 1 'परीक्षण {,...

mysql - How to compare query results for multiple tables? -

I have 3 tables, users, AccessControlKey and AccessControlGroup. Users can be assigned multiple products. AccessControlKeys can be assigned to multiple AccessControlGroups, however, the user can not be assigned more than one access control control, i.e. a user has several access control groups assigned to it, the access controller is assigned to the AccessControl group. For many relatives between Accesscontrolkeys and users and accesscontrolkeys and accesscontrolgroups, I have two different tables. I have the following table descriptions for the 3 tables and relationships mapping table. How can I apply unique access controls to more than one access control group for a user? From your description, I guess each There is a AccessControlKey in user and the key is multiple AccessControlGroup s. P> I might change the data structure and change my User_BelongsTo_AccessControlGroup to User_AccessControlKey ( user to AccessControlKey ); You can apply specificity her...

objective c - Facebook Login Button Alignment iOS -

I want some help in programmatic aligning the Facebook login button here code that Facebook SDK gives you and it Puts in the center at the top of the storyboard. I want to align it to a special place at the bottom of my storyboard. This is where SDK holds it: ...... here is the place where I have to keep it: Thanks guys. // Facebook login button FBLoginView * LoginView = [[FBLoginView alloc] init]; // Align the button in the horizontally login center view.frame = CGRectOffset (loginView.frame, (self.view.center.x - (loginView.frame.size.width / 2)), 5); [Self.view addSubview: loginView]; Try setting the center property instead of the frame Similarly I do it. loginView.center = CP Pointsmake (Confidence / 2, Self Height - 40);