Friday, 15 April 2011

c# - Can not get value when selection is changed in combobox wpf -


I choose such Datgrid'm trying to update is changed in wpf from Knboboks

  private void cmbBatchNo_SelectionChanged (object sender, SelectionChangedEventArgs e) {try {string select CmdString = "or scholarship Where course =" + Simbiandarjiradu. Text + "and Bac_nau =" "+ N Simbiabac. Text + "; SQL Command cmd = new SQL Command (CMD string, SC); SqlDataAdapter sda = new SqlDataAdapter (cmd); Detatabl dt = new Detatabl (" employee "); SdakFill (DT); StdAttendencekItemsSource = dt.DefaultView;} catch (exception ex) {Sndeshbaks. Show (ex.Message, "error", MessageBoxButton.OK, MessageBoxImage.Error);}}  

If I combo box items name'm trying to find a message box to show it is showing empty box

or cmbUndrGradu.SelectedItem.ToString () .


c# - How to use an Expression<Func> to set a nested property? -


Then I have some code that sets the property on the object. This code is from an internal verification class which we are using in unit tests. Something like the code

can be supplied <0> private static zero SetDeepValue (object targetObject, the expression & lt; string & gt; propertyToSet of function, object valueToSet) { Var underlyingProperty = ((PropertyInfo) ((MemberExpression) propertyToSet.Body) .member); Built-in Property. Set Value (Target Object, Cost Costs); }

This code is a unit-test type environment, where we can then call

(CurrentTestCaseValue in String TestCaseSets) {BusinessObject MyCustomer = New BusinessObject () is used; Setup value (myCustomer, () => myCustomer.FirstName, Current TestCaseValue); ValidateBusinessRules (myCustomer); }

(Simplified code for brevity / complexity)

However, due to some refactorings, we are left with something like this:

  foreach (string current credentials value in test casease) {BusinessObject myCustomer = new BusinessObject (); SetDeepValue (myCustomer, () = & gt; myCustomer.NameInfo.First, Current TestCaseValue); ValidateBusinessRules (myCustomer); }  

Runs this code, we get the error.

object does not match the target type

I suspect that this is the first property instead of the name code Trying to call BusinessObject . How can I modify my code to handle this 'Nest' case?

After

Here you can usually change the string to "columnname 1. columnname 2" in a lambda expression x = & gt; X.ColumnName1.ColumnName2 :

  Expressions & lt; & Lt; T, Object & gt; & Gt; Prohibited property (string columnname) {// X parameter expansion para = expression Parameter (typef (t), "x"); // x.ColumnName1.ColumnName2 Expression Property = Columnname.LimP ('.') .Gregate & lt; String, Expression & gt; (Ultimate, (C, M) => Expression Property (C, M)); // x = & gt; X.ColumnName1.ColumnName2 expression & lt; Func & lt; T, Object & gt; & Gt; Lambda = expression. Lambda & lt; Func & lt; T, Object & gt; & Gt; (Expression. Conversion (property, type (object)), absolute); Return lambda; }  

(copied)


sublimetext3 - Split lines on spaces in Sublime Text -


How do I split lines into sublime text 3? I tried ctrl + t, ctrl + x

but it does not work.

I

  This is a sentence  

I would like to make it

  This is a sentence  

I always use Ctrl + H (replacement), regular expression matching (Alt + R) and then replace all with "\ n".


Python Pandas ix timestamp -


I have a panda dataframe form CSV file with the following index

  Time stamp SOG Height 2015-03-11T08: 49: 53.000Z 0 20 2015-03-11T08: 49: 42.000Z 0 19 2015-03-11T08: 49: 32.000Z 0 24 .....  

I would like to use ix to break the dataframe but I have to enter the index only hours and minutes, not true value.

For example

  df3 = df.ix ['2015-03-11T08: 49': '2015-03-11T08: 52', ['SOG' , 'Height']]  

Should I use regular passengers or is there a way for pandas to do this?

If you time stamp a DatetimeIndex, you can use it :

  import io import pandas as pd text = '' '\ timestamp SOG altitudes 2015-03-11T08: 49: 53.000Z 0 20 2015-03-11T08: 49: 42.000 J. 1 9 2015-03-11 Tate 8: 49: 32 degree 0 24 '' 'df = pd.read_table (io.BytesIO (text), sep =' \ s {2,} ') df [' Time stamp '] = pd.to_datetime (df [' time stamp ']) df = df.set_index ([' time stamp ']) df.between_time (' 8:49:32 ',' 8:49:52 ')  

yields

  SOG Altitude Time Stamp 2015-03-11 08:49:42 0 19 2015-03-11 08:49:32 0 24  

javascript - jquery ajax call not returning as expected -


I'm sure that it jquery calls ajax why fail. Actually, I want to get certified and if there is certification success then do something.

I have come to know this but the answer seems to be summarized in order to use too much for me (believe that you already know how to apply the solution).

Function authentication () {$ .ajax ({// TODO:

Securely (SSL?) It type: ' POST ', url:' / clientAuthenticate.php ', data: {username: username, password: password}, ​​success: function (data) {if (data ===' true ') "returns" returns "user" Failed to log into the system. \ N Email request has been ignored. \ N \ n Error message: \ n "+ data;}}, error: function (jxaxhr, textstats, errorpruneration) {w C "user failed to enter system. Probable problem with server or connection.";}});

And I call it in this function:

  Function Effort Submit Request (EK) {var authReturn = authenticate (); if (authReturn == "true") {emailEvent (eKey);} and {Warning (authReturn);}}  

When it comes back, it always warns that authReturn is "undefined" I suspect that authReturn is not defined as defined That the authentication function is 'finished' before the AJAX call ...

But I'm not sure how to fix this problem

I suspect that I will return the return values Instead of making separate calls ... (in this example, calling the email event function directly in the AJAX success function), but it will make the authentication function unique ... and use it for authentication for other purposes Right in Will not.

You can use your code but a callback will be required.

  Function Authentication (OnSewas, Onfail) {$ .ajax ({// TODO: Send it securely (SSL?) Type: 'Post', URL: 'include / clientAuthenticate.php ', Data: {username: username, password: password}, ​​success: work (data) {onsuccess (data); // you should check that this is function}, error: function (jqXHR, textstats, error reporting) {Onfail (errorThrown);}}}; Function Effort Submit Request (A) {Authentication (Function (AJAXData) {Email Event ('Whatever You Want to Send')}}, Function (Error Message) {Warning (Wrong);}); }  

lotus notes - xPage add placeBar item -


I want to add place. Label the label to the right. The title of PlaseBar appears in the form of text on the left, all buttons / items appear correct. But there is no option to add just one text / label as an item, if I can not add a label, how can I style the button to hide the edge?

Enter the image </ P> </ p> </ div> <p> < <Div> <div> & Lt; xe: basicLeafNode label =

and give it a class "label placebar".

Set Enable on "false." This way it will not change the mouse cursor hover over the label.

The page for the boundary and general mode Use the label "Label Place" in the classroom to hide the landland and to hover:

  .label place A, .label place bar A: hover {border: none; background : Transparent;}  

Then it will display the label as a label.


php - How to display variations in the Shop page Woocommerce -


I want to display differences with prices instead of regular prices on the first page, not an item page.

Now: $ 10-100

I need it: - $ 10 Rent - $ 100 Buy

I want to show prices for variations I use this function in Add Prices to Php

  // variations add_filter ('woocommerce_variation_option_name', 'Enter code here' '' '' '' '' '. Function display_price_in_variation_option_name ($ word) {global $ wpdb, $ Product; $ result = $ wpdb- & gt; get_col ("steal {$ wpdb-> prefix} rules where name = '$ word' '); $ Term_slug = (empty ($ result)) $ $ Results [0]: $ word; $ Query = "SELECT postmeta.post_id AS product_id FROM {$ wpdb- & gt; prefix} postmeta AS postmeta LEFT JOIN {$ wpdb- & gt; prefix} .ID = postmeta.post_id) like 'attribute_%' and postmeta.meta_value = '$ term_slug' as WHERE postmeta.meta_key and above Ifts ($ origin & gt; 0); $ (value); $ _product = New WC_Product_Variation ($ variation_id [0]); // This is the price where you can actually customize how the price is displayed in the return word '(' .woocommerce_price ($ _product- & gt; Get_price ()). '' '; } Return word; }  

But how can I request variations in the loop of the shop page? I try to use get_available_variations (); But it does not work for me


entity framework - Code first deploy on production -


prod on my DP PC copy of DB and address I

The production I saw in the system table Had the 8 migration records exist in _MigrationHistory (the first version of the code was written and posted by another person).

I need to add some new tables and codes to work with them - models and controllers. I can add new models for the new tables and code for the controller.

> Options-database "Script" With Options

and without executing it on the output to get the table in my DEV DB and script.

I bin folder and Prod to deploy to run the SQL script to create new tables in the need to copy the contents of the new ideas and DB.

I was thinking that this is sufficient because at the moment I see records for all the migrations in related records in my Dev environment in the production environment in system tables _MigrationHistory

If I only PROD But if I run SQL Script then a new record for this operation can not be seen in _MigrationHistory. It may be possible to separate the model to get an error and deploy it. Be a problem after. Before making changes to the production database, make sure that you have a full backup.

I was wondering if it is enough for me at the moment I see the same kind of record production environment records all migration in your dev environment system table - _MigrationHistory

If you run the code in your development environment, then your explicit migration will apply.

If I understand your comment correctly, then you are in Migration and PROD in Dev itself. If this is true, then the prod may be up-to-date.

Look in your project in your Migration folder. There you will see a complete list of migrations, each one in their .cs file (and related .Designer.cs and .resx files). <<< p>

If I only run SQL Script, you can run SQL Script on the output. A new record for this action can not be seen in _MigrationHistory

Take a look at your migration script and enter the appropriate entry in __MigrationHistory where they participate (including the output). Here is an example of one of my projects:

INSERT [dbo]. [__ Migration History] ([Maigreshnaidi], [Sndrbkaini], [model], [Utpadwarsn]) value (N'201409082209285_VDisposer ', N'Survey.Model.Migrations.MembershipConfiguration.MembershipConfiguration', 0x1F8B0800000 ... 1A0200, N ' 6.1.1-30610 ')

it is possible that one reason that the model is to receive the error is different and

Any problem after deployment Maybe, if you are getting an error that the model does not match the database, then there is another reason.

  • Backup your production database.
  • Restore it in your DEV environment (use a different name from your normal DEV database, or backup your DEV database first if using a different name, temporarily web.config Remember to change to a new database.)
  • Create a new migration.
  • See the code ready for the new migration. It tells you what is in Prod and what position God is in.
  • After configuring your web, remember to undo the change.


    unix - Why is it common for binary (ELF) SUID executables to also allow READ access? -


    To take advantage of the proof-of-concept as part of the recent "Rohammer", read-voodoo-edem The tool was "ping"

    and therefore my question - why do vengeance (especially the root) in various distributions make the executable readable as well as executable?

    My speculation includes:

    1. Use facility with "ldd"
    2. Tri-veer or package-update checking software is non- To allow it to run as root
    3. this
    4. Cilinux can be used to make this irrelevant
    5. lazy developers

    (3), hiding the public distribution binary only gives a fig leaf of security - and (5) there are too many names.

    is not a complete answer, but I found out that if I need to read route root programs They have been stored on an NFS server.

    I should say again: The local file system was enough for the set-root programs on chmod 4711, but the required mode on the NFS 4755 .


    php - Theme assets management in Symfony2 -


    I have a Symfony2 app, which needs to work on different topics These topics include essentially CSS files (Ultimately other files and mine in a single)

    In the Falcon, I could dynamically set the assets of my property in the controller. In Symfony, property is clearly defined, my current solution is as follows, but it does not look very good. This is my HTML of base.html.twig . My entity has a property subject and I define the subject object in my controller.

    Actually I am looking for the proper way to do this in Symphony. Otherwise, I would love it like that.

      & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" /> & Lt; Title & gt; Welcome {% block title%}! {% Endblock%} & lt; / Title & gt; & Lt; Link rel = "icon" type = "image / x-icon" href = "{{asset ('favicon.ico')}}" /> {% if theme is defined} {% theme.css%} For asset in & lt; Link rel = "stylesheet" href = "{{asset.url}}" /> {% Endfor%} {% endif%} & lt; / Head & gt; & Lt; Body & gt; Welcome to the {% block page%} default page! {% Endblock%} {% Subject Javascript%} {% Subject is defined} {% property.js%} for asset in 
    
    
    
            

      फ़ॉरकेड फ़ॉरकेड अपडेट (वर्तमान समय: सीएफटीईइन्इंटरवल) {var पसंद = arc4random_uniform (2) अगर (पसंद == 0) {var Redball = SKSpriteNode (imageNamed: "Redball") redBall.setScale (0.5) redBall.position = CGPointMake (self.size.width / 2, self.size.height) redBall.size.height = 20 redBall.size.width = 30 redBall.physicsBody = SKPhysicsBody (circleOfRadius: redBall.size.height / 2.75)? redBall.physicsBody .dynamic = सच self.addChild (Redball)} अगर (विकल्प == 1) {var Redball = SKSpriteNode (imageNamed: "Redball ") redBall.setScale (0.5) redBall.position = CGPointMake (self.size.width / 5, self.size.height) redBall.size.height = 20 redBall.size.width = 30 redBall.physicsBody = SKPhysicsBody (circleOfRadius: RedBall.size.height / 2.75) redBall.physicsBody? .dynamic = true self.addChild (redBall) } यदि (पसंद == 2) {var redBall = SKSpriteNode (imageNamed: "redBall") redBall.setScale (0.5) redBall.position = CGPointMake (self.size.width * 5, self.size.height) redBall.size। ऊंचाई = 20 redBall.size.width = 30 redBall.physicsBody = SKPhysicsBody (circleOfRadius: redBall.size.height / 2.75)? redBall.physicsBody .dynamic = सच self.addChild (Redball)}}  

    आप बस एक SKAction का उपयोग कर सकते हैं जो कि अद्यतन समारोह

      समारोह yourFunction () {// आपकी कोड} ओवरराइड समारोह didMoveToView (देखें: SKView)। {super.didMoveToView (देखें) जाने updateAction = SKAction.runBlock {( ) - & gt; self.yourFunction में शून्य ()} जाने waitDuration: NSTimeInterval = 5.0 जाने updateAndWaitAction = SKAction.sequence ([updateAction, SKAction.waitForDuration (waitDuration)]) जाने repeatForeverAction = SKAction.repeatActionForever (updateAndWaitAction) self.runAction (repeatForeverAction)}  

    javascript - can't show ng-template in ng-repeat -


    I have a ng-repeat to the ng-template Also does not show items. How is this possible?

      & lt; Script type = "text / ng-template" id = "tree_renderer" & gt; & Lt; Period & gt; {{E. Names}} & lt; / Span & gt; & Lt; / Script & gt; & Lt; Div class = "tree" & gt; & Lt; Ul & gt; & Lt; Li ng-repeat = "n in item" ng-include = "'tree_render'" & gt; & Lt; / Li & gt; & Lt; Li ng-repeat = "item in e" & gt; {{E. Names}} & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;  


      'strict experiment'; Angular.module ('nodeTreeApp'). Controller ('NodeCtrl', function ($ radius, $ dialog, $ http) {$ scope.items = [{"name": "root", "type_name": "node", "show": true, "nodes True, "nodes": [{"Name": "Node-1" node-1-1 ":" Node-1 "," Show " , "Show": true, "nodes": []}, {"name": "node-1-2", "device_name": "node-1-2", "show": true, "nodes" : []}, {"Name": "node-1-3", "device_name": "node-1-3", "show": true, "nodes": []}], {"name ":" God "," group_name ":" node-2 "," show ": true e," nodes ": [" name ":" fan "," device_name ":" node-2-1 "," show ": True," nodes ": []}]}, {" name ":" "node-3", "sh True: "nodes": []}, {"name": "Fess", "group_name": "node-4", "show": true, "nodes": []}]}];} );  


      'strict experiment'; Angle (module) '});});  

    You should use .html in your template id and ng-included .

    I created this example based on the code (s) you provided:

    UPDATE

    Hair nodes To display, you need to nested ng-repeat, but take a look.


    javascript - Can't seem to simulate a jQuery link click -


    I have apologized for adding another jQuery question yet but I have beaten my head against this code for a long time I am doing The following code is used on my website: #iframe div to fill with content loaded via $ .get (). ANS works properly (saves unpleasant page leap from irrelevant scrollers and scolisy libraries) but it is not yet able to figure out how to restore page content based on the document. If someone can know why this code is not, or maybe provide some insight whether it is a better way to go about doing it, it would be greatly appreciated.

    Thank you before time, Brian


      $ (document) .ready (function () {console.log ("execution of embedded jQuery.") If (Document.location.hash.length == 0) {$ ("# home") [0]. Click (); console.log ("clicking the #home link.");} And {$ (document. Location.hash). [0] Click the console.log ("simulate" + Document.location.hash + "click the link.") $ $ ("# Header #nav a"). Function () {if (! $ (This!) .hasClass ("active")} {$ ("#nav a"). RemoveClass ("active"); $ (this) .addClass ("active"); document Location.hash = $ (this) .attr ('href'); switch (document.location. Hash) {case "#home": $ .get ("{text: DocumentRoot} in Dex.html ", function (data) {. $ (" #ifframe ") HTML (data); Console.log (" loaded index.html ");}); break; case" #showcase ": $ .get ( "{Text: documentRoot} showcase.html", function (data) {$ ("# iframe") .html (data); console.log ("loaded showcase.html");}); breakage; case "#out ": $ .get (" {text: documentRoot} about.html ", function (data) {$ (" # iframe "). Html (data); Console.log ("loaded about.html");}); break; Case "#GitB": $ .get ("{text: documentRoot} github.html", function (data) {$ ("# iframe") .html (data); console.log ("loaded github.html") ;}); break; Default: console.log ("no relevant page.") Event.preventDefault (); break; }}}); }); Edit: {text: DocumentRoot} is a tumblr placeholder value that I set:   

    You are trying to trigger an event before actually setting events as soon as you reorder your code:

      $ (Document) .ready (function () {console.log ("executed embedded jam."); $ ("# Header #nav a" .click ("function") (if (! $ (This) .hasClass ( RemoveClass ("active"); $ (this) .addClass ("active"); Document.location.hash = $ (this) .attr ('href' ); Switch (document) .location.hash) {case "#home": $ .get ("{text: documentRoot} index.html", function (data) {$ ("# iframe") .html (data);}); break; Case "#showcase": $ .get ("{text: documentRoot} showcase.html", function (data) {$ ("#iframe"). Html (data);}); break; case "#about": $ .get ("{text: documentRoot} about.html", function (data) {$ ("# iframe") .html (data);}); break; case "#gitb": $ .get ("{ Text: documentRoot} github.html ", function (data) {$ (" # iframe "). Html (data);}); break; Default: event.preventDefault (); break; }}}); If (document.location.hash.length == 0) {$ ("# home"). Trigger ("click"); Console.log ("clicking the #home link."); } And {$ (document.location.hash). Trigger ("click"); Console.log ("simulate" + document.location.hash + "click the link."); }});  

    c++ - Why can templates only be implemented in the header file? -


    से उद्धरण:

    इस समय टेम्पलेट्स का उपयोग करने का एकमात्र पोर्टेबल तरीका है इनलाइन फ़ंक्शंस का उपयोग करके हेडर फाइल में।

    यह क्यों है?

    (स्पष्टीकरण: हेडर फाइल केवल पोर्टेबल समाधान नहीं है लेकिन वे सबसे सुविधाजनक पोर्टेबल समाधान हैं।)

    यह नहीं आवश्यक है हेडर फाइल में कार्यान्वयन करने के लिए, इस उत्तर के अंत में वैकल्पिक हल देखें।

    फिर भी, आपका कोड असफल रहने का कारण यह है कि जब एक टेम्पलेट को तत्काल बनाया जाता है, तो कंपाइलर एक नया वर्ग बनाता है दिए गए टेम्पलेट तर्क उदाहरण के लिए:

      टेम्पलेट & lt; typename T & gt; संरचना फू {टी बार; शून्य करना कुछ (टी परम) {/ * टी का उपयोग कर सामान करते हैं}}; // कहीं एक। सीपीपी में फू & lt; int & gt; च;  

    इस लाइन को पढ़ते समय, संकलक एक नया वर्ग (चलो इसे FooInt कहते हैं) बनायेगा, जो निम्न के बराबर है:

      ढांचे FooInt {int बार; शून्य से कुछ (इंट परम) {/ * इंट का उपयोग करते हुए सामान करते हैं}}  

    नतीजतन, संकलक को विधियों के कार्यान्वयन तक पहुंच की आवश्यकता होती है, उन्हें टेम्पलेट तर्क के साथ इन्स्तांत करने की आवश्यकता होती है (इस मामले में int )। यदि ये कार्यान्वयन शीर्षलेख में नहीं थे, तो वे सुलभ नहीं होंगे, और इसलिए संकलक टेम्पलेट को इन्स्तांत करने में सक्षम नहीं होगा।

    इसका एक सामान्य समाधान है कि टेम्पलेट घोषणापत्र लिखकर शीर्ष लेख फ़ाइल, फिर कार्यान्वयन फ़ाइल में वर्ग को लागू करें (उदाहरण के लिए .tpp), और हेडर के अंत में इस क्रियान्वयन फ़ाइल को शामिल करें।

      // Foo.h टेम्प्लेट & lt; typename T & gt ; संरचना फू {शून्य से कुछ (परम); }; #include "Foo.tpp" // Foo.tpp टेम्पलेट & lt; typename T & gt; Void Foo & lt; T & gt; :: doSomething (T param) {// कार्यान्वयन}  

    इस तरह, कार्यान्वयन अभी भी घोषणा से अलग है, लेकिन संकलक के लिए सुलभ है।

    < P> एक अन्य समाधान को कार्यान्वयन अलग रखना है, और सभी टेम्पलेट उदाहरणों को स्पष्ट रूप से इन्स्तांत करना है जिन्हें आप की आवश्यकता होगी:

      // Foo.h // कोई कार्यान्वयन टेम्पलेट & lt; typename T & gt; Struct Foo {...}; // ---------------------------------------- // Foo.cpp // कार्यान्वयन फू के तरीकों के बारे में स्पष्ट स्पष्टता टेम्पलेट वर्ग Foo & lt; int & gt ;; टेम्पलेट वर्ग फू & lt; float & gt ;; // यदि आप केवल स्पष्टीकरण स्पष्ट नहीं कर रहे हैं, तो आप केवल वही फू या फ्लोट का उपयोग कर सकते हैं 


    logging - Understanding the WriteStream in Node.js -


    Recently I wrote a small multi-room chat application that was using Node.js and Socket.IO And I log in the messages sent to different files based on the room they came in. At the moment I am using several writing streams (one in each room) to store this functionality, but when it works, I was wondering how to actually use the writing streams is.

    My concerns:

    1. When I implemented the first writing stream, it seemed to be a perfect match instead of writing the whole file, whenever someone posted a new post I used to go - although retrospective I'm not sure that it is ideal to open 10-20 streams all the time.
    2. I currently use the .end () function when the end user leaves a room, but on one side of the callback function I can not use it, there is no way to say that All the messages have already been called (finally calling), which brings me back with 1. And the question if I am using the writing streams, because it is done to use it

    I think my question is ... should write / write serials In such cases can be used for admission purposes? Do they throttle resources while waiting for input, or does it open large numbers for extended periods of time?

    With respect to point 2 I can be quick: when you .end () < Call / code> on a writing stream, the stream no longer accepts new writes, but it completes writing the data file system. You do not have to worry about losing part of your chat log - unless there's an error (for this, listen to the stream 'error' event).

    And regarding the point 1: I do not believe there is anything wrong with opening the file system stream for a long time. Many applications do this, for example, to write your logs. One potential problem I see with your setup is that, as much as your chat system is managing, so much data increases, you can quickly generate chat logs, you can write them on the file system . If this happens, then your stream will start to buffer more data and in the end your process will be out of memory and accident. Of course it depends on your data versions.


    openerp 8 - ODOO 8 - How to publish website? -


    ODOO 8 - How to launch website after designing with website builder?

    For example:

    example.com - runs on Odu.

    I have created a small website using the Website Builder app but I do not know how to publish it. If I open an example.com, then I'm getting Odu's login page, not the app I used to create a website.

    Only if I log in and click on the website button, it is showing me the website

    How to solve it?

    Just look at the link below from the bus Odu Forum

    I hope my answer can help you :)


    winforms - EntityFramework 6 Transaction.Rollback and Commit -


    I need to create a cancel button that will return all the changes since the last reference is saved. I got this rollback used to work on a button click. However, the datagrid view does not reflect change. If I leave the program then I can see that no data was changed.

    I have got the following form to work on (I do not see any error in the output window) However, the statement that I have read in reference to the statement is still in this situation Applicable? I used rollback and tried / saved the method of saving, but this plane object 'does not look right. What if I was born in any other form, whether it will add to the current transaction or not?

      /// & lt; Summary & gt; /// & lt; / Summary & gt; Public Partial Category Form 2: Form (/// & lt; Summary & gt; /// & lt; / summary & gt; Private Test Content Text _ Convert; /// & lt; Summary & gt; /// & Lt; / summary & gt; Private DbContextTransaction _transaction; /// & lt; Summary & gt; /// & lt; / summary & gt; Public Form 2 () {Initialization ();} /// & lt; Summary & gt; /// & lt; / summary & gt; /// & lt; param name = "e" & gt; & lt; / param & gt; Safe Override Zero OnClosing (CancelEventArgs e) {base.OnClosing (E); _transaction.Rollback (); _context.Dispose ();} /// & lt; summary & gt; /// & lt; / summary & gt; /// & lt; param name = "e" & Gt; & lt; / param & gt; Secure Override Zero Onload (EventAgsg E) {base.OnLoad (e); _context = New TestContext (); _transaction = _context.Database.BeginTransaction (); SetupDataGridView ();} /// & lt; Summary & gt; // & Lt; param name = "sender" & gt; & lt; / param & gt; /// & lt; param name = "e" & gt; & lt; / lt; / Param> Private Zero btnCancel_Click (Object Sender, EventArgs e) {_transaction.Rollback (); _context = New TestContext (); SetupDataGridView (); _transaction = _context.Database.BeginTransaction (); } /// & lt; Summary & gt; /// & lt; / Summary & gt; /// & lt; Param name = "sender" & gt; & Lt; / Param & gt; /// & lt; Param name = "e" & gt; & Lt; / Param & gt; Private Zero btnSave_Click (Object Sender, EventArgs E) {Valid (); PersonDataGridView.CommitEdit (DataGridViewDataErrorContexts.Commit); _context.SaveChanges (); _transaction.Commit (); PersonBindingSource.ResetBindings (true); _transaction = _context.Database.BeginTransaction (); } /// & lt; Summary & gt; /// & lt; / Summary & gt; Private Zero SetupDataGridView () {_context.People.Load (); ObservableCollection & LT; Person & gt; People = _context.People.Local; PersonBindingSource.DataSource = people.ToBindingList (); PersonBindingSource.RaiseListChangedEvents = True; PersonDataGridView.AutoGenerateColumns = false; PersonDataGridView.DataSource = PersonalBindingSource; }}  


    elasticsearch - Error using Discover feature for ES index -


    I have an index called apitestresults, it's spring-data-redactive, version 1.1.2. Through the Reliez, which is connected to Elastic Search 1.4.4 , I populate. Then I have Kibana 4.0.1 to access elastic search examples, it already contains other indices. Discover -> Settings -> IndexPattern -> Fill ApacheTestes, I get the following error :

      Unwanted error: [$ rootScope: inprog] $ Digest already progressed http: // errors .angularjs.org / 1.2.28 / $ root scope / inprog? P0 =% 24digest (http: // myHostName: 5601 / index.js? _b = 5930: 22313)  

    Here is also shown on a screenshot (blackand part is hostname) image of problem

    Any help is greatly appreciated

    Thanks a lot!


    c# - Dynamically binding a dropdown control's selection -


    I have a home page, where I get the div to & lt; Asp: repeater ... / & gt; Control Now & lt; Div & gt; On click event on a button in , I am sending this page to the registration form where I have the & lt; ASP: Dropdown ... /> control.

    On the event of the Page_load registration page, I am populating the dropdown from the database and DataTextField and DataValueField .

    Now I type EventTypeID to the dropdown. Specifying the drop code from DataValueField and names . .DataTextField . I have also checked that in the dropdown on the rendering, the code is EventTypeID in the value field

    :

      Protected Zero Page_Old (Object Sender, EventArgues E) {Event Typogologic Event Typical Labic = New Event Type Opposite (;); Int eventTypeID = Convert.ToInt32 (Request .Jquery String ["id"]); DdlEventType.DataSource = eventTypeLogic.populateEventTypeDDL (); DdlEventType.DataValueField = "EventTypeID"; DdlEventType.DataTextField = "name"; DdlEventType.DataBind (); DdlEventType.Items.Instert (0, new list item ("Choose Event Type", "0")); If (eventTypeID> 0) {ddlEventType.SelectedIndex = eventTypeID; }}  

    dropdown ASPX code:

      & asp: dropdown list id = "ddlEventType" runat = "server" CssClass = "span2 form-info" />  

    Home page code:

      & lt; / P & gt; & Lt; H6 & gt; & Lt; A class = "BTN BTN-custom" href = '& lt; % # "HostEvent.aspx? Id =" + Eval ("EventTypeID")%> '& Gt; & Lt; B & gt; Host Event & lt; / B & gt; & Lt; / A & gt; & Lt; / H6 & gt;  

    Problem: I want the drop-down to be hand selected before hand, depending on the selection on the home page.

    Update:

      Protected Zero Page_Old (Object Sender, EventArggs E) {Event Type Lologic Event Taclausic = New Event Type (Latin) ; Int eventTypeID = Convert.ToInt32 (Request .Jquery String ["id"]); String name = Event typoogic. Rolvetmon (EventTapID); DdlEventType.DataSource = eventTypeLogic.populateEventTypeDDL (); DdlEventType.DataValueField = "EventTypeID"; DdlEventType.DataTextField = "name"; DdlEventType.Items.Instert (0, new list item ("Choose Event Type", "0")); //ddlEventType.DataBind (); DdlEventType.SelectedIndex = eventTypeID; DdlEventType.DataBind (); }  

    If you want to display EventName Before requesting a query with eventTypeId , get a pre-selected value in your Ddl and all the information about that event and try it out.

      / / I think that when you check the fire you get an item `event details` if (eventTypeID> 0) {ddlEventType.SelectedIndex = eventTypeID; DdlEventType.SelectedValue = EventDetails.EventTypeID.ToString (); }  

    This should work!


    Apache SSL authentication connection is not permitted for expired certificate even if SSLVerifyClient is optional -


    When I try to connect to the directory on Apache via HTTPS using SSL authentication authentication, where SSLVerifyClient is set to Optional

    , connection is not permitted for the expiry of the certificate, but without the certificate it is.

    Do anyone know how to allow connections with the expired certificate for clients? Even if the user is allowed without authentication.

    I use the application and certificate of certification for the certificate without the certificate and if the certificate is expiring (is finished), then it will be renewed (of course other verification ) It works on IIS and I need to move Apache into practice.

    Thanks for the suggestions.

    SSLVerifyClient is set to optional

    This means that the client certificate will be requested. Admission is provided if the customer does not provide the certificate but if the client does not provide a certificate and this certificate can not be verified then access is not granted. I believe that this behavior may seem silly, but how does it happen.


    ios - Moving from XIB (aka NIB) file to Main.storyboard and the init method is not called -


    I always want to launch a word game, so 2 weeks ago I bought an app template.

    Unfortunately, the source code purchased uses XIB files (and does not use ARC) - and I would like to change it.

    So I got a man. The storyboard file has been added and the first XIB file in it. I have ctrl-drages properties, set the "Initial view controller" checkbox and specify "Main" as the "Main Storyboard File Base Name" (here):

    Unfortunately, I see in the debugger, this code which was located in init HomeViewController .m is not run (here):

    Xcode

    So my question is: init method when using storyboard instead of NIB files To change the name of the key, so that it can be run again?

    I think my question is very easy for experienced iOS programmers but I could not find the answer (for example by Apple).

    • To get the storyboard from XIB:

      Move the code from init to initWithCoder:

    • Optimize the core and data code, because < Code> initWithCoder: After being asked: DidFinishLaunchingWithOptions: (while init was called first)


    javascript - nginx/angular/node.js root URL with prerender.io -


    We have been using an angular SPA node, NGN, and Our home page is set as a unique URL (i.e. www.foo.com/bar) and in our routing, this home page does not specifically make the default redirect of other root-relative URLs specially otherwise.

    Our problem is: Root URL comes back with a blank page scrap for www.foo.com or www.foo.com/ Google and Facebook Our index is a NG is the basic basic template in which all pages are inserted from inside, so it is understood that our root URL returns without any real HTML body content. Key HTML in the index:

      & lt; Div class = "st-content" & gt; & Lt; Div ng-view = "" class = "main-content" id = "main view" & gt; & Lt; / Div & gt; & Lt; Div ng-include = "'/ views / footer.html'" & gt; & Lt; / Div & gt; & Lt; / Div & gt; In addition, we have tried other solutions without positive results:  
    • The base tag linking the '/' in the index head, which would not break anything ...
    • 307 redirects, no results
    • Nginx configuration looks good

      Note: In-house routing for '/' Write this question to me to change:

       . When ('/', {templateUrl: '/ views / foo-bar.html', Title: 'Foo Bar', Page Description: 'Larm Ipsum Fu Bar'}). . . Otherwise ({redirectTo: '/'});  

      If this is changed, will the scrap of the house still show in the blank form? Is it basically not the same JS redirection problem, but with fewer characters?

    You have to set the window.prerenderReady variable. Thus, place it in your root controller:

      window.prerenderReady = false;  

    ... and this is the success of your controller in the callback function:

    window.prerenderReady = true;


    javascript - Alternative for jQuery scroll function? -


    मेरे पास एक jQuery स्क्रिप्ट है जैसा निम्न है:

      $ (document) .ready (Function () {$ (window) .scroll (function () {if ($ (this) .scrollTop () & gt; 100) {$ ('# algemeen')। सीएसएस ('position', 'fixed'); $ ('# Algemeen')। चेतन ({शीर्ष: '0 पिक्सेल', बायीं: '70% ', चौड़ाई: '10%'}, 200);} और {$ ('# अलगेमिन')। सीएसएस ('स्थिति ',' निरपेक्ष '); $ (' # algemeen ')। चेतन ({शीर्ष:' 300px ', बायीं:' 100px ', चौड़ाई:' 200px '}, 200);}});});  

    जैसा कि आप देख सकते हैं, मुझे यह div '#algemeen' मिल गया है जो उस स्थान को बदलता है जब पृष्ठ 100 पिक्सल नीचे स्क्रॉल होता है। समस्या यह है, यह बहुत लम्बी है और जब मैं स्क्रॉल कर रहा हूं तो अक्सर इसकी 'डाउनस्कॉल' स्थिति में रहता है क्या मेरा लक्ष्य हासिल करने का एक बेहतर तरीका है?

    धन्यवाद अग्रिम!

    का उपयोग करने के लिए बेहतर तरीका है और jQuery के / वर्ग कृपया जांचें, हम कक्षा एनिमेटेड को बदलते हैं:

    जावास्क्रिप्ट :

      $ ( दस्तावेज़)। पर ('तैयार', फ़ंक्शन () {var scroller = $ ('# algemeen'); $ (विंडो) .on ('scroll', फ़ंक्शन () {if ($ (this) .scrollTop () & gt ; 100) {scroller.addClass ('एनिमेटेड');} और {scroller.removeClass ('एनिमेटेड');}});});  

    से सीएसएस :

      # सेलिगर्मि {स्थिति: निरपेक्ष; शीर्ष: 300px; बाएं: 100px; चौड़ाई: 200px; संक्रमण: सभी रैखिक .2s; } # Algemeen.animated {स्थिति: तय; शीर्ष: 0; बाएं: 70%; चौड़ाई: 10%; }  

    यह बेहतर है क्योंकि:

    • ब्राउज़र एनिमेशन स्क्रिप्ट की तुलना में तेज़ हैं, वे कम सीपीयू का उपयोग करते हैं, वे बेहतर अनुकूलित होते हैं और इसकी वजह से वे अक्सर देखते हैं
    • स्क्रिप्ट से सीएसएस को बदलना आसान है, आप मीडिया प्रश्नों को लागू कर सकते हैं।

    आपको समझा सकता है (एक अच्छा डेमो है)।

    < / div>

    php - Using MySQL Database login as the backend for verifying admin login on site -


    So I'm building my first website that requires access to an admin login portal and a simple MySQL database . I would like to ask if it is a terrible idea to use an acceptable / unacceptable system that was originally created in my DB to verify admin login.

    Make me clear,

       

    There may be some errors in the code, but I have written it here, consider this phony code. I want to know why this is worse and the fact is that if it feels dirty then it feels dirty. Yes, I know that I need to encrypt the username and password for the transfer.

    Uh, yes, this is a terrible idea. Here's why:

    If you log in user with an existing MySQL user, then you have a lot of security problems. Besides you a new mysql user for a new mysql user who you want to add to your web application. You also need to consider the risk of mysql injection. ()

    You better prepare a database for your application and create a user table In this user table, you can define your username and password. In addition you can define a user type. For example, general users and administrators, where only admins can log into your administrator portal.

    I recommend using a php structure for your application. This makes working a lot easier and your code is much safer.


    routing - regular expression in symfony -


    कृपया इस संदर्भ को देखें।

      ब्लॉग: पथ: / ब्लॉग / {पेज} चूक: {_controller: AcmeBlogBundle: ब्लॉग: सूचकांक, पृष्ठ: 1} आवश्यकताएं: पेज: \ d +  

    यह सिम्फोनी के रूटिंग सिस्टम के बारे में ट्यूट्रायल के yml फ़ाइल उदाहरण में से एक है। मुझे लगता है कि यूआरएल की स्थिति अगले पैटर्न की तरह है।

      पथ: / ब्लॉग / {पेज} / {देश}  

    इस पद्धति में, मैं कैसे लिखूं आवश्यकताओं के बारे में कॉन्फ़िगरेशन फ़ाइल

    आपको बस yml फ़ाइल में एक कुंजी के रूप में चर नाम का उपयोग करना चाहिए, इसलिए <पूर्व> ब्लॉग: पथ: / ब्लॉग / {पेज} / {देश} / {जो भी} डिफ़ॉल्ट: {_controller: AcmeBlogBundle: ब्लॉग: अनुक्रमणिका, पृष्ठ: 1} W + whatever: \ w +

    \ d + , \ w + बस सामान्य नियमित अभिव्यक्ति है, आप regexps के बारे में अधिक जानकारी देख सकते हैं < / P>


    c# - RunWorkerCompleted is returning before work seems to be completed -


    I am using a query to fill a blankbox in the WPF application. I have a pop, but all the items are immediately closed before loading in the box. There is no way to control this. I have a passive busy indicator inside the Runawalkar compartment method, but it appears that it has been done before. Here's what I have:

      private void before looking link (object sender, routing avent ARG e) {CboCustomerList.Items.Clear (); Busy indicator Isubcussi = true; BackgroundWorld SearchWorker = new backgroundwork (); ItemSearchWorker.DoWork + = New DoWorkEventHandler (FillCustomers); ItemSearchWorker.RunWorkerCompleted + = New RunWorker Component Action Handler (itemSearchWorker_Completed); ItemSearchWorker.RunWorkerAsync (); } Private void before SearchWorker_Completed (object sender, RunWorkerCompletedEventArgs e) {//busyIndicator.Visibility = System.Windows.Visibility.Hidden; Busy indicator ISUB = false; } Private Zero FillCustomers (Object Sender, DoWorkEventArgs E) {SqlDataAdapter Adapter = New SqlDataAdapter (); Dataset ds = new dataset (); String sql = "Siititibl to Choosing NAME of orders; String Connection String = settings. Difoltkprodkshn connection; SqlConnection connection = new SqlConnection (connectionString); SqlCommand SqlCmd = new SqlCommand (); SqlCmd.CommandType = CommandType.Text; SqlCmd .Connection = connection; SqlCmd.CommandText = sql; SqlDataReader reader = null; connection.Open (); reader = SqlCmd.ExecuteReader (); list & lt; string & gt; ListOfString = new list & lt; string & gt; (); while (ReaderkRead ()) {ListOfStringkAdd (reader [ "NAME"]. ToString ());} Dispatcher.Invoke ((action) (() = & gt; CboCustomerList.ItemsSource = listOfString)) ; Connection.Close ();} < / Code> 

    Note the settings of the indicator before calling, and to close the busy indicator in the item SearchWorker_Completed function, until the entire function is not asked before, should not wait? < According to MSDN, you should never manipulate the UI object in the background worker dwarf event.

    You should be careful not to manipulate any user-interface objects in your Duplicate Event Handler. Instead, change the progress and contact the user interface via Runwalker's Comprehensive Event.

    in your FillCustomers method that I recommend you to change this line:

      dispatcher. Invoke (Action) (() => CboCustomerList.ItemsSource = listOfString);  

    To do this:

      e. Results = ListoffString;  

    is now complete:

      Private Void Item SearchWorker_Completed (Object Sender, RunWorkerCompletedEventArgs e) {CboCustomerList.ItemsSource = e.Result list form In & lt; String & gt ;; //busyIndicator.Visibility = System.Windows.Visibility.Hidden; Busy indicator ISUB = false; }  

    Bash concatenate strings results in each variable within quotes -


    I am trying to add 2 variables to the string in the bash. I have seen many posts on this and for some reason they do not work for me. This is my script which takes only one filename prefix and adds the current date till the end.

      #! / Bin / bash now = $ (date + "% Y% m% d") instead of  instead of  "file" "20150316"  fname = "file" x = $ fname $ now Echo $ x  

    File20150316 ".

    Please help please.

    You are using incorrect quotes (Unicode is not the actual ASCI ones). Try this:

      #! / Bin / bash now = $ (Date "+% Y% m% d") fname = "file" x = "$ fname $" now "echo" $ x " 

    Direct Stdin To C Program -


    इसमें मेरे पास एक फ़ाइल है

      योद्धा 12, 60 तलवारबाज 39, 25 ओरिक 12, 13  

    इन नामों वाला फ़ाइल नाम जिसे चश्मा कहा जाता है।

    मैं इसे अपने सी कार्यक्रम में निर्देशित करने की कोशिश कर रहा हूँ की तरह, चश्मा | Myprogram.c

    अब सवाल के लिए, मैं कैसे फ़ाइल में प्रत्येक आइटम के माध्यम से जाना है, और यह एक सरणी में जोड़ें ???

      myArray = {योद्धा, 12, 60, तलवारबाज, 39, 25, ओरिक, 12, 13}  

    आप बस ऐसा कर सकते हैं -

      संरचना युक्ति {चार नमूना [15]; // यह चार * भी हो सकता है तो आपको उपयुक्त int डेटा आवंटित करना होगा 1; इंट डाटा 2; }; संरचना कल्पना specarr [100]; .... ... (इनपुट का अंत नहीं है) ... स्कैनफ़ ("% 14 s% d,% d", और specarr [i] .specname, और specarr [i] .data1, और specarr [ मैं] .data2);  

    मुझे लगता है कि आप यही करना चाहते हैं। इसे देखें।


    function - Python turtle user input -


    I am trying to write some code, when the user overlaps the tortoise, this is what I just But it only pulls a pentagon all the time.

      Import Turtle Turtle Size ('tortoise') DRF triangle (): I in range (3): For turtles. (50) Turtle right (360/3) def class (): For the range I (4): For turtles. (50) Turtle Wright (360/4) def Pentagon (): In Category (5) I: For Turtles. If answer == ('triangle'): triangle () aliff answer == ('square'): 50) Turtle. Wright (360/5) Answer = Input ('Select a shape. Triangle, Square or Pentagon'): Square () Alif Answer == ('Pentagon'): Pentagon () Other: Print ('Incorrect input') < / Code> 

    You can try the code below:

     < Code> import turtle deaf triangle (): For the range i (3): For turtles. (50) Turtle Wright (360/3) Def Square (): For the category I (4): For Turtles. (50) Turtle Wright (360/4) def Pentagon (): For the category I (5): For turtles. (50) Turtle (Answer) if answer == ('triangle'): triangle () elif answer = () '' triangular '' ('tortoise') Answer = raw_input ('choose a shape ... triangle, class or pentagon:') = ('Square'): class () alif answer == ('Pentagon'): Pentagon () Other: Print ('wrong input')  

    jquery - How to add css in HTML title -


    This question is already an answer here

    • 6 replies
    datatable for one

    I am using my data population I'm using the title for header tooltip. But can I use CSS with it? Like I tried

      #mainTable title {font-weight: bold; Font-size: 30px; Red color; }  

    and I want to use CSS in table headers inside createTable = '& lt; Table ID = "mainTable" class = "display" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; The title = & gt; the date of the activity that was not done during this period. "; Start period & lt; / Th & gt; & Lt; Th title = intelligence (milestone) & gt; Intelligence & lt; / Th & gt; & Lt; Th title = engaged (milestone) & gt; Engaged & lt; / Th & gt; & Lt; Th & gt; Eligibility & lt; / Th & gt; & Lt; Th & gt; Internal submission & lt; / Th & gt; & Lt; Th & gt; Current & lt; / Th & gt; & Lt; Th & gt; Interviews & lt; / Th & gt; & Lt; Th & gt; Support & lt; / Th & gt; & Lt; Th & gt; Placements & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; ';

    Can I get in any way?

    Short answer: You can not.

    Long answer: You can create your own tooltip popups that you have control over CSS if you have to use javascript. You can write your own, or you can use one of the many available plugins


    c# - How to detect debug mode in t4 template? -


      & lt; # @ template debug = "false" hostpecific = "सही" भाषा = "सी #" # & gt; डीबग वास्तव में सच है, तो मैं आउटपुट फाइल में अतिरिक्त लाइन लिखना चाहूंगा, मैं किसी तरह से डिबग फ्लैग किस तरह से सेट कर सकता है?   

      & lt; # @ टेम्पलेट डीबग = "गलत" भाषा = "सी #"  

    # & gt; & Lt; # @ विधानसभा नाम = "सिस्टम। कॉन्फिगरेशन" # & gt; & Lt; # # अगर DEBUG # & gt; मैं डीबग में हूँ & lt; # #se # # मैं रिलीज में हूं & lt; # #endif # & gt; debug = "true" के लिए आपको "मैं डिबग में हूँ" देखना चाहिए, जबकि debug = "false" के लिए आउटपुट हो जाएगा "मैं रिलीज में हूं"।


    javascript - In for loop, why does i++ change to 1 after second use? -


    0 से 1 के लिए लूप में परिवर्तन क्यों करता है?

    < P> यह पंक्ति: for (var i = 0; i & lt; siteDatabase.length; i ++) पहले से पाश में 0 से 1? वृद्धि? जिसके बाद साइटडाबेस [i] का उपयोग 1 के बजाय 1 सूचक पर तत्व तक पहुंचने के लिए किया जाता है। मैंने सोचा कि मैंने + + 2 लूप पर बढ़ोतरी की है?

    परिणाम विधि कॉल (पुश) द्वारा एक अपरिभाषित तत्व के लिए एक त्रुटि है। < / P> <पूर्व> var newsUpdates = {}; Var siteDatabase = ["http://example.to"]; Var स्क्रैपरज = की आवश्यकता होती है ('स्क्रेपरज'); के लिए (var i = 0; i & lt; siteDatabase.length; i ++) {समाचार [साइटडेटाबेस [i]] = []; Scraperjs.StaticScraper.create (siteDatabase [i])। Scrape (फ़ंक्शन ($) {वापसी $ ("। Lang_English")। नक्शा (फ़ंक्शन () {वापसी $ (यह)। बच्चे ('टीडी')। Eq (1 ) (बच्चे) ('a')। पिछले ()। पाठ ();})। Get ();}, फ़ंक्शन (समाचार) {for (var x = 0; x & lt; news.length; x ++) {if ( समाचार [x] == '') {news.splice (x, 1);}} के लिए (var x = 0; x & lt; news.length; x ++) {// i साइट में डेटाबेस [i] 0 नहीं है, पुश ({"शीर्षक": समाचार [x]}); // प्रकार: त्रुटि: अपरिभाषित की विधि 'धक्का' कॉल नहीं कर सकता console.log (newsupdates);})}} < / कोड>

    समस्या उस क्षेत्र पर है जो मैं कोड के बीच टिप्पणी करता हूं।

    जिस कार्य में आप .scrape में गुजर रहे हैं एक स्थायी संदर्भ को i चर में, उस की एक प्रति जैसी नहीं जब फ़ंक्शन बनाई गई थी। तो यह i के मूल्य का उपयोग करता है जब फ़ंक्शन चलाता है , जो कि (संभवतः) बाद में लूप समाप्त होने के बाद, जब i

    इस मामले में, मैं शायद कॉलबैक बनाने के लिए एक बिल्डर फ़ंक्शन का उपयोग कर रहा था, ताकि कॉलबैक उस चीज़ को बंद कर दे जो कि नहीं बदलता है:

      Var समाचार अद्यतन = {}; Var siteDatabase = ["http://example.to"]; Var स्क्रैपरज = की आवश्यकता होती है ('स्क्रेपरज'); के लिए (var i = 0; i & lt; siteDatabase.length; i ++) {समाचार [साइटडेटाबेस [i]] = []; Scraperjs.StaticScraper.create (siteDatabase [i])। Scrape (फ़ंक्शन ($) {वापसी $ ("। Lang_English")। नक्शा (फ़ंक्शन () {वापसी $ (यह)। बच्चे ('टीडी')। Eq (1 ) (बच्चे) ('ए') अंतिम ()। पाठ ();}), ();}, बिल्ड कॉलबैक (i)}} फ़ंक्शन बिल्डकेलैक (इंडेक्स) {रिटर्न फ़ंक्शन (समाचार) {for (var x = 0 ; एक्स और लेफ्टिनेंट; न्यूज़ लैलेथ; x ++) {यदि (न्यूज [x] == '') {न्यूज़स्प्लस (एक्स, 1); }} के लिए (var x = 0; x & lt; news.length; x ++) {newsUpdates [siteDatabase [inindex]]। पुश ({"शीर्षक": समाचार [x]}); } Console.log (समाचार अद्यतन); }; }  

    वहां, हम build कॉलबैक से बाहर आने वाले फ़ंक्शन को अनुक्रमणिका तर्क से बंद कर देते हैं, जिसका मान कभी भी नहीं बदलता है इसके बाद हम इसे i में भेजते हैं ताकि हमारे कॉलबैक का निर्माण करें।


    javascript - webdriver-manager update error: EACCES, permission denied -


    I used to run the operator tests successfully (on the Mac) and I tried to upgrade the version, so I ran

    / Code>

      version 1.8.0  

    But now, while walking,

     < Code> $ WebDriver Manager started  

    I get

      fs.js: 6 42 return binding. MKDIR (pathModule._makeLong (path), ^ Error: EACCES, on permissions object / usr / local / lib / node_modules / protractor / selenium 'on object.fs.mkdirSync (fs.js: 642: 18). & Lt; anonymous & gt; (/ usr / local / lib / node_modules / protractor / bin / Webdriver-manager: 108: 6) on module._comile (module.js: 456: 26) Object.Module._extensions..js On (module.js: 474: 10) module.load (module.js: 356: 32) on the function module._load (module. JS: 312: 12) at the ceremony. Module RyanMan (Module JS: 497: 10) at Startup (Approval E.js: 119: 16) at node.js: 902: 3  

    Any ideas?

    with webdriver-manager update with sudo :

      $ sudo -s $ webdriver is required to run - Administrator Update  

    php - CRON & CLI for basic Magento inventory update automation? -


    I'm new to cli and cron so some advice / guidance is needed.

    I have Magento

    Until then I need to automate stock inventory updates.

    I use magma for almost all imports, but SKU, volume & amp; I am struggling to find a clear instruction for setting up a scheduled (daily) import of a CV including AM; Value areas

    I do not really have the time to learn all the codes at this time (though this is on my list), so I'm looking for some guidance about how to import Maggie through CLI And make a cron to run daily.

    We have a tool that exits CVS or XML files from 200 to 200 and can put them in the folder on the server, a bit of it that raises the file and imports once a day is!

    Any help would be appreciated.

    Once you have prepared your CSV file and you are ready to go, Maggie profile must be set up and then you can call it like this:

      Php /path/to/your/website/httpdocs/magmi/cli/magmi.cli.php -profile = & Lt; Maggie profile you want to use & gt; -Mod = create -CSV: file name = "/ path / in / your / csv / file.csv"  

    python - Pandas Version 12 - add new 'column' to series -


    See pad 0.12, how do I add a new area for a series ? Import

    The syntax given below works for 13 more, but fails for 12:

      b ['new_col'] = 123 Error: 'new_col not in this series!  

    Parallel, works for ver = below> = 13 but then fails in version 12:

      b.loc ['new_col' ] = 123 Error: 'New_col'  

    Finally I tried to do this, it does not give any error, but does not add new field-value pair:

    How can I add this new column to the b series in panda version 12?
      b.set_value ('new_col', 123)  

    ?


    stored procedures - How to combine a CASE statement with a LATERAL JOIN in PostgreSQL? -


    I need to call the function multiple times for each selection row, because the function has several out parameters, which I need Select

    example

      SELECT a, b, (from func (a)), choose from (func (a) 2) From table 1 to  

    To call this function only once I use to join in the background

      SELECT a, b, lat.out1, lat.out2 LEFT OUTER Join Later (Select Out 1, Out 2 F The font is thrown on (a)) Let's (TRUE)  

    problem a is the func throwing exception with being called Then it happens without it I will have to do it

      Select one, b, case when there is no function, then from the fon (a) end, case when no funnel is out Does not occur a) End of table 1  

    but how do I use it in joining the side ? Is there a way to use CASE to join the side? Or is there any other way of calling the process only once? Good question you can create a wrapper function which is

    / P>
      function wrap_func (an integer) returns $$ as the return table (out1 int, out2 int) if a blank is returned; end if; Return query (out1, out2 choose from func (a)); End; $$ language plpgsql;  

    If you call the cover in your side , then it will behave as you expect.


    mysql - How to UPDATE in one table in SQL based on matching data in another table? -


    I got many questions with similar questions, but no one addressed me to a specific question.

    How does updating with such conditions work between two unlinked tables?

    As an example

      TABLE_I id, place, junk, junk, junk TABLE_II ID, category, placed, note, junk, junk ...  

    If the status is in tabi_II

      where range = 9 and note = @ test rate  

    should be an update, where One value in tab IV matches one in the table_i

      UPDATE TABLE_I SET placed = @ testvalue WHERE  

    .. current TABLE_I.Placed = Table_II.Placed Assume that the above conditions are met

    whether the SQA Is such a step-conditioning even possible in L? Or will it require coding outside of the query to test it in phases?

    SQL

      update t1 SET Add t1.Placed = @ testvalue Table_1 T1 to Table 2 in 2 t2. Place = t2. Place where t2.Category = 9 and t2.Note = @ testvalue  

    MySQL

    The answer is yes you can

    P> Try this to include such a

      table_1 on t1 t1 in table_2 T2. Place = t2.placed where t2.Category = 9 and t2.Note=@testvalue SET t1.Placed = @ testvalue   

    Edit:

    Inclusion in normal update To be:

      Add a updated tablet to a.join_colA = b.join_colb SET A.columnToUpdate = [some]  
    on a join table b < / Html>

    c++ - Use LLVM debugger inside Emacs on OSX Yosemite -


    I want to know whether it is possible to use LLVM debugger with AMX, MX GDB Interface standard thank you in advanced.

    It is surprising to add LLVM debugger support to Emacs (or not, depending on your level of eccentricity) ) Is controversial.

    In February, 2015:

    The LLVM source stores contain a pad in which gud.el has been added to the basic support of ludb.

    It seems that there is a systematic attempt to attack GNU packages. Need to strategically respond to the GNU Project, which means that every GNU package does not cooperate with each attack. For now, please do not install this change.

    One of the current maintenance, Stefan Monnier is:

    Thanks, Andrew. I would be happy to include such a patch. I took a quick look at the code and saw it from a distance, there is no problem with it, so in reality everyone has to clear the copyright status of this code.

    As of March, 2015, I do not believe the LLVM debugger patch has been accepted.


    html - Update a jQuery script dynamic -


    Can a URL be inserted into a jquery code altogether?

    use document.URL : for intance

      document.URL + "? Par1 = par1 and par2 = Par2"  

    reporting services - SSAS Grouping Hierarchy -


    SSAS परियोजना में मेरे पास निम्न तालियां हैं:

    • EntityGroup जो समूहों को परिभाषित करता है (उपरोक्त प्रकारों में से एक)

    कोड> एंटिटी समूह टाइप एक या अधिक समूहों के साथ एक एकल इकाई संबद्ध हो सकते हैं सदस्यता को EntityGroupMembership नामक एक टेबल में परिभाषित किया गया है।

    मैंने एक कोड को एक कोड के साथ Entity Group भी परिभाषित किया है: Entity Group Type - & gt; इकाई समूह

    एक विशिष्ट एसएसआरएस रिपोर्ट के लिए, मैं संस्थाओं को दो स्तरों में समूह बनाना चाहूंगा: पहले, प्रकार 1 के समूह द्वारा, फिर प्रकार 2 के समूह द्वारा। ऐसा कुछ: [इकाई गणना] पर एक्सिस (0), {([इकाई समूह]। [सभी संस्था समूह]। [1]। बच्चों * [इकाई समूह]। [सभी इकाई समूह]। और [2]। बच्चों)} पर एक्सिस (1) से [Cube1]

    अगर मैं ऐसा करने की कोशिश करता हूं, तो मुझे निम्न त्रुटि मिलती है:

    मैं इस त्रुटि के तर्क को समझता हूं लेकिन फिर भी मैं अपना लक्ष्य कैसे प्राप्त कर सकता हूं?


    < P> संपादित करें : मैं परिदृश्य को स्पष्ट करने की कोशिश कर रहा हूं और मैं क्या हासिल करना चाहता हूं।

    EntityGroupType परिभाषित करता है प्रकार समूहों की (जो श्रेणियों की तरह हैं):

    <प्री> ग्रुपटाइप्इड समूहटाइप डीस्क ----------- -------------------- - रंग 2 समूह पर आधारित 1 समूह आकार

    EntityGroup पर आधारित acutal groups परिभाषित करता है:

     GroupID GroupTypeID GroupName --------- - ----------- --------- 1 1 रेड 2 1 ब्लू 3 1 पीला 4 2 सर्किल 5 2 आयत 6 2 त्रिभुज 

    EntityGroupMembership एक समूह के साथ एक इकाई के शून्य / अधिक संघों को परिभाषित करता है:

    <पूर्व> EntityID GroupID EntityDesc ----------- ----------- - --------------- 1 2 रेड सर्कल 1 4 रेड सर्कल 2 3 पीला आयत 2 5 पीला आयत 3 3 पीला चक्र 3 4 पीला चक्र

    मेरा आयाम <कोड > इकाई समूह में एक ही पदानुक्रम है:
    एंटिटी ग्रुप पदानुक्रम

    < P> चूंकि एक इकाई एक से अधिक समूह का सदस्य हो सकती है एस, मैं सबसे पहले एक प्रकार के समूहों के आधार पर मापना चाहता हूं, फिर, दूसरे प्रकार के समूहों के आधार पर मापने के लिए। यह पारस्वाही [सभी प्रकार के समूह] * [सभी प्रकार के समूह] के रूप में होंगे आउटपुट कुछ ऐसा होगा:

    <प्री> इकाई संख्या --------- ------ ------------ सर्किल सभी 3 सर्किल लाल 0 सर्कल ब्लू 1 सर्कल पीला 2 आयत सब 5 आयत लाल 5 आयत नीला 0 आयत पीला 0 त्रिभुज सभी 2 त्रिभुज लाल 1 त्रिभुज नीला 1 त्रिभुज पीला 0

    कृपया ध्यान दें कि विशेषता इकाई समूह दो बार दिखाई देता है, जिसका अर्थ है कि मैं वास्तव में एक विशेषता को पार करने की कोशिश कर रहा हूं (इसीलिए मैंने यह उल्लेख किया कि मैं त्रुटि के तर्क को समझता हूं)।
    > यदि बस MDX का उपयोग करना संभव नहीं है, तो मैं

    धन्यवाद!


    c - Microsoft visual studio 2010 -



    c - Microsoft visual studio 2010 -

    i have question 2 folders indicated in image ( external dependencies , ressource files ), utility of these 2 folders, , can set within them ?

    in c programming illustration ?

    on top of head, external dependencies may include dlls having entry point, whereas resource file may include dlls without entry point(resource dll) or image.

    c visual-studio-2010

    c++ - integrating user control to a form in Visual studio -



    c++ - integrating user control to a form in Visual studio -

    i have visual studio project, in have form , user control. have dragged user command on form not bult. receive error "'name of user cntrol' not fellow member of 'the name of form'"

    i solved problem follows.

    i removed namespace of project in h file of user control. include nameoftheusercontrol.h in h file of form.

    c++ visual-studio-2005 windows-forms-designer

    ruby on rails - Overriding parent's class method via super / yield + variables? -



    ruby on rails - Overriding parent's class method via super / yield + variables? -

    i have rails 3 app , have subclass inherits superclass. overload parent class' class method. i'm trying utilize super block, can access multiple variables in parent , vice versa?

    example:

    class parentclass class << self def method_to_override #blah blah before yield block yield resource if block_given? end end end class childclass < parentclass class << self def method_to_override super |resource| #code within block can utilize resource variable end end end end

    how can pass more resource variable? tried including yield (variable1, variable2) if block_given? didn't work.

    ruby-on-rails

    c++ - 2 dimensional array in pointers -



    c++ - 2 dimensional array in pointers -

    #include<stdio.h> void main() { int a[] = { 1, 2, 3, 4 }; int b[] = { 5, 6, 7 }; int *p[2]; p[0] = a; p[1] = &b + 1; printf("%d\n%d", &p[1][0], p[0][1]); }

    here p 1d array of pointers, how come 2d array used in printf statement. output 1 2.

    the subscript operator [] defined pointer expressions array expressions (which implicitly converted pointer expressions before subscript applied).

    the look a[i] evaluated *(a + i); a pointer, , a + i gives address of i'th element of array (pointer arithmetic based on pointed-to type; if a points int, a + i gives address of i'th int next 1 pointed a).

    so given array of pointers:

    int *p[2];

    the look p[0] has pointer type, can add together offset , dereference result: *(p[0] + 1), same writing p[0][1].

    c++ c pointers

    garbage collection - What is a GCRecord in a database? -



    garbage collection - What is a GCRecord in a database? -

    i have been introduced mvc, in uses sql database.

    in of tables within project, there column optimisticlockfield, , gcrecord (both of type int).

    i have found quite extensive info on optimistic/pessimistic locks. however, can't find gcrecord used for, or when used, nor why included.

    the 'definition' 1 liner:

    a gc record represents single garbage collection activity. independent of whether gc occured due manual gc request or allocation failure.

    but still none wiser means, or if right 'definition' context.

    is sql thing? or should used in most/all databases?

    the gcrecord field used mark objects have been removed collection. part of mechanism called deferred deletion

    database garbage-collection ssms

    sql server - TSQL : Is replace better than ltrim/rtrim -



    sql server - TSQL : Is replace better than ltrim/rtrim -

    is replace improve ltrim/rtrim. have no spaces between words, because running on key column.

    update [db14].[dbo].[s_item_60m] set [item_id]=ltrim(rtrim([item_id])) item_id having non-clustered index

    shall disable index improve performance?

    windows 7, 24gb ram , sql server 2014

    this query running 20 hours , canceled it. thinking run replace instead of ltrim/rtrim performance reasons.

    ssms studio crashed.

    now can see running in activity monitor

    error log says flushcache: cleaned 66725 bufs 25872 writes in 249039 ms (avoided 11933 new dirty bufs) db 7:0

    please guide , suggest me.

    the throughput of mass updates not depend on single phone call per row ltrim or rtrim. arbitrarily pick highly visible element of query , consider responsible bad performance. @ query plan see what's beingness done physically. also, create familiar mass update techniques (such dropping , recreating indexes).

    note, contrary popular belief mass update rows in 1 statement fastest option. strategy can cause blocking , high log usage. has best throughput because optimizer can optimize dml executing in 1 plan. if splitting dml chunks thought sql server automatically part of plan.

    sql-server tsql

    node.js - Get all in MongoDB collection using SocialCMS with Breeze -



    node.js - Get all in MongoDB collection using SocialCMS with Breeze -

    i'm using socialcms database middleware https://github.com/dai-shi/social-cms-backend breezejs support.

    i'm able save changes mongodb collection fine using manager.savechanges() , manager.acceptchanges() , retrieve records in local cache using getentities()

    using middleware

    with breezejs support:

    var scb_options = { mongodb_url: 'mongodb://localhost:27017/socialcmsdb', breeze_mongo: true, routes: [{ object_type: 'user', object_prefix: '/breeze-service/users' }, { object_type: 'post', object_prefix: '/breeze-service/posts' }, { object_prefix: '/breeze-service/savechanges' }] };

    how retrieve remote records belonging particular route? example, want retrieve total posts remotely not in users cache.

    do modify app.js, angular apps datacontext, both or neither?

    i solved problem. it's bit hard discern social cms docs routes local first. great if want route without net access! needed create new routes outside of scb_options in order request mongodb directly.

    node.js angularjs mongodb breeze middleware

    How do you pull data from a .FIC file in java? -



    How do you pull data from a .FIC file in java? -

    so writing scrabble word suggestion programme decided because wanted larn sets (don't worry, @ to the lowest degree got part) , referencing info/data not created within program. im pretty new java (and programming in general), wondering how pull words word list .fic file in order check them against words generated letters inputted.

    to clarify, have written programme takes series of letters , returns set of every possible word created letters. example: input:

    abc

    would give set containing "words":

    a, ab, ac, abc, acb, b, ba, bc, bac, bca, c, ca, cb, cab, cba

    what asking, really, how check find ones contained in .fic file.

    the file "official crosswords" file moby project word list , still (very) shaky on parsing , other file dealing-with methods. continuing research dont have prototype code that.

    sorry if question isn't exclusively clear.

    edit: here method makes "words" create easier understand idea. part don't understand how pull word(as string) .fic file.

    private static set<string> words(string s) { set<string> tempwords = new treeset<string>(); if (s.length() == 1) { // base of operations case, lastly letter tempwords.add(s); // system.out.println(s); uncomment when debugging } else { //set add together each letter in s (int = 0; < s.length(); i++) { //cut letter out of string string remaining = s.substring(0, i) + s.substring(i+1); //recursion add together combinations of letters onto current letter/"word" (string permutation : words(remaining)) { // system.out.println(s.substring(i, i+1) + permutation); uncomment when debugging //add total length words tempwords.add(s.substring(i, i+1) + permutation); // system.out.println(permutation); uncomment when debugging //add not-full-length words tempwords.add(permutation); } } } // system.out.println(tempwords); uncomment when debugging homecoming tempwords; }

    i dont know if best solution, figured out (hobbs line thing helped lot, give thanks you). found works:

    public static void main(string[] args) throws filenotfoundexception { scanner s = new scanner(new filereader("c:/users/sean/workspace/imbored/bin/113809of.fic")); while(true) { words.clear(); string letters = enterletters(); words.addall(words(letters)); while(s.hasnextline()) { string line = s.nextline(); string finalword = checkwords(line, words); if (finalword != null) finalwordset.add(finalword); } s.reset(); system.out.println(finalwordset); system.out.println(); system.out.println("_________________________________________________________________________"); } }

    a few things:

    the checkwords method checks if current word file in generated list of "words" the enterletters method takes user inputted letters , returns them in string the words method returns set of strings of of possible combinations of characters in given string, each character used many times appears in string , no repeated "words" in returned set. finalwordset , words arraylists of strings defined instance variables(i set them in main method i'm lazy , doesn't matter case)

    i sure there better/more efficient way this, @ to the lowest degree works.

    finally: decided reply rather delete because didn't see answered anywhere else, if sense free delete question or link other reply or whatever, @ point help other people.

    java

    io - vdbench what is the parameter for controlling the queue depth? -



    io - vdbench what is the parameter for controlling the queue depth? -

    how can command queue depth of vdbench? looking input parameter corresponding queue depth unable locate so. please help.

    thanks

    look threads= parameter. farther questions, please @ http://www.oracle.com/technetwork/server-storage/vdbench-downloads-1901681.html

    io

    Adding radio buttons onto a graph drawn in java using jfreechart or swing -



    Adding radio buttons onto a graph drawn in java using jfreechart or swing -

    i need add together radio button onto graph performs specific action when selected. have drawn graph using jfreechart in java. unable figure out way add together radio button onto graph. possible so? if not, possible draw line graph in swing , add together radio buttons on top of it? in advance.

    you should have chartpanel instance add together jfreechart application. seek set layoutmanager e.g. boxlayout or borderlayout , add together radio button panel proper constraints define desired position.

    java swing jfreechart

    javascript - Bind dynamic columns to a table using angularJS -



    javascript - Bind dynamic columns to a table using angularJS -

    i getting info external service , trying show on table. problem info service dynamic columns, times there 5 column time 8. don't know how handle in ng-repeat. , using things ng-grid won't solution think there 10 rows display. if utilize external solution overhead. there angular method accomplish this? if not best alternative little data.

    note: column names dynamic code

    <div ng-app='myapp' ng-controller="mainctrl"> <div ng-repeat="prdelement in packageelement track $index" class="package-grid"> <table class="hovertable"> <thead> <tr> <th>line #</th> <th>quantity in plt</th> <th>allready packed</th> </tr> </thead> <tbody> <tr ng-repeat="data in prdelement.data" ng-init="data.newquantity = 0"> <td>{{data.itemid}}</td> <td> {{data.quantity}} </td> <td>{{data.packed}}</td> </tr> </tbody> </table> </div>

    angular.module('myapp', []).controller('mainctrl', function ($scope) { var counter = 0; $scope.packageelement = [{ name: counter, show: true, data: [{ name: 'item 1', itemid: '284307', quantity: '100', packed: 0 }, { name: 'item 2', itemid: '284308', quantity: '200', packed: 0 }] }]; });

    will there same number of columns info items? if so, think can this.

    1. define function on scope gives object keys: $scope.keys = function(obj) { var key; var keys = []; (key in obj) { if (key === "$$hashkey") break; //angular adds new keys object if (obj.hasownproperty(key)) keys.push(key); } homecoming keys; } 2. utilize repeater on table header (if objects can have different properties, need find object highest number of properties/columns) <th ng-repeat="key in keys( prdelement.data[0] )">{{key}}</th> 3. utilize repeater on table cell <td ng-repeat="key in keys( prdelement.data[0] )">{{ data[key] }}</td>

    javascript angularjs

    entity framework - "k ef migration add test" gives exception when using code first migrations in asp.net vNext -



    entity framework - "k ef migration add test" gives exception when using code first migrations in asp.net vNext -

    i'm not sure if supposed work yet, couldn't find much info this. i'm running command

    k ef migration add together test

    in effort enable migrations code first model. exception is:

    system.typeloadexception: method 'next' in type 'microsoft.data.entity.sqlserver .sequentialguidvaluegenerator' assembly 'entityframework.sqlserver, version =7.0.0.0, culture=neutral, publickeytoken=null' not have implementation.

    this implies isn't implemented yet, find hard believe. maybe i'm doing wrong?

    the project utilize created vs2014 ctp3 , set utilize core clr. project.json:

    { "webroot" : "wwwroot", "exclude": "wwwroot/**/*.*", "dependencies": { "entityframework.sqlserver": "7.0.0-alpha4", "microsoft.aspnet.mvc": "6.0.0-alpha4", "microsoft.aspnet.identity.sqlserver": "3.0.0-alpha4", "microsoft.aspnet.identity.authentication": "3.0.0-alpha4", "microsoft.aspnet.security.cookies": "1.0.0-alpha4", "microsoft.aspnet.server.iis": "1.0.0-alpha4", "microsoft.aspnet.server.weblistener": "1.0.0-alpha4", "microsoft.aspnet.staticfiles": "1.0.0-alpha4", "microsoft.framework.configurationmodel.json": "1.0.0-alpha4", "microsoft.visualstudio.web.browserlink.loader": "14.0.0-alpha4", "entityframework.commands": "7.0.0-*" }, "commands": { /* alter port number when self hosting application */ "web": "microsoft.aspnet.hosting --server microsoft.aspnet.server.weblistener --server.urls http://localhost:5000", "ef": "entityframework.commands" }, "frameworks": { "aspnet50" : { }, "aspnetcore50" : { } }

    }

    i thought maybe versioning problem, changed ef reference this:

    "entityframework.sqlserver": "7.0.0-*"

    which gives me exception on migrations command:

    system.exception: todo: no service type 'microsoft.data.entity.migrations.modeldiffer' has been registered.

    which guess improve exception get, couldn't find on how prepare this. available musicstore sample not utilize migrations.

    update

    the context , model:

    public class mycontext : dbcontext { public dbset<mymodel> mymodels { get; set; } protected override void onconfiguring(dbcontextoptions options) { var configuration = new configuration(); configuration.addjsonfile("config.json"); options.usesqlserver(configuration.get("data:defaultconnection:connectionstring")); base.onconfiguring(options); } } public class mymodel { public int mymodelid{ get; set; } public string name { get; set; } }

    startup:

    public class startup { public void configure(iapplicationbuilder app) { // setup configuration sources var configuration = new configuration(); configuration.addjsonfile("config.json"); configuration.addenvironmentvariables(); // set application services app.useservices(services => { // add together ef services services container services.addentityframework().addsqlserver(); // add together mvc services services container services.addmvc(); }); // enable browser link back upwards app.usebrowserlink(); // add together static files request pipeline app.usestaticfiles(); } }

    maybe important, i'm running on windows 10 technical preview.

    update 2

    maybe of import versioning problems, nuget.config:

    class="snippet-code-html lang-html prettyprint-override"><?xml version="1.0" encoding="utf-8"?> <configuration> <packagesources> <add key="aspnetvnext" value="https://www.myget.org/f/aspnetvnext/" /> <add key="nuget.org" value="https://nuget.org/api/v2/" /> </packagesources> <packagesourcecredentials> <aspnetvnext> <add key="username" value="aspnetreadonly" /> <add key="cleartextpassword" value="4d8a2d9c-7b80-4162-9978-47e918c9658c" /> </aspnetvnext> </packagesourcecredentials> </configuration>

    asp.net entity-framework asp.net-core entity-framework-core

    java - Gui crashes after login code -



    java - Gui crashes after login code -

    this login code. code runs fine until gets part needs switch screens homepage. after displaying "you have logged in!" message ends program. ideas? using netbeans 7.3.1

    private void jbutton1actionperformed(java.awt.event.actionevent evt) { boolean valid = false; string user = txtuser.gettext(); string pass = txtpass.gettext(); seek { scanner sc = new scanner(new file("file.txt")); while(sc.hasnextline()){ string[] line = sc.nextline().split("#"); if(line[0].equals(user) && line[1].equals(pass)){ valid = true; } } } grab (filenotfoundexception ex) {} if(valid == true){ joptionpane.showmessagedialog(null, "you logged in!"); system.out.println("you user!"); //doesn't run homepage adm = new homepage(); adm.setvisible(true); this.dispose(); }else{ joptionpane.showmessagedialog(null, "your username or password incorrect!"); }

    check disposing in this.dispose(). perchance disposing jframe or other component contains rest of ui components

    java login netbeans-7

    pipe - How does the parent select which forked child process to communicate with? -



    pipe - How does the parent select which forked child process to communicate with? -

    i created several kid processes 1 parent, , created bidirectional pipes between each process , parent. problem how can go , forth between kid processes , parent different type of works, , allow children communicate parent? thinking maintain track of each process's pid, , utilize identity switch. technically, how? attached code have far.

    struct val { int testint; char testchar; }; int main () { val val1; pid_t cpid[3]; int fd[2], fdd[2]; int sfc; (int i=0; i<3; i++) { pipe(fd); pipe(fdd); cpid[i]=fork(); if(cpid[i]==0) { cout<<"\ni kid , pid is:"<<getpid(); cout<<"\nmy parent is: "<<getppid(); sfc=i; close(fd[1]);//close fd-pipe write end kid read(fd[0], &val1, sizeof(val1));//read pipe close(fdd[0]); write(fdd[1], &sfc, sizeof(sfc)); close(fd[0]); close(fdd[1]); cout<<"\nchild received value: "<<val1.testint<<val1.testchar; cout<<"\nchild sent value: "<<sfc; cout<<endl; break; } else { close(fd[0]);//parent close read end of pipe fd close(fdd[1]);//parent close write end of pipe fdd val1.testint=4; val1.testchar='a'; write(fd[1], &val1, sizeof(val1));//parent write fd read(fdd[0], &sfc, sizeof(sfc));//parent read fdd close(fd[1]); close(fdd[0]); wait(null); cout<<"\ni parent , have child: "<<cpid[i]; cout<<"\nparent sent out value: "<<val1.testint<<val1.testchar; cout<<"\nparent received value: "<<sfc<<endl; } } homecoming 0;

    }

    process pipe fork

    web scraping - How do I scrape a web page using C? -



    web scraping - How do I scrape a web page using C? -

    so i've written web site scraper programme in c# using html agility pack. straight forward. accounting inconsistencies in formatting on web page, still took me couple of hours working.

    now, have re-implement programme in c can run in linux environment. major nightmare.

    i'm able pull page when comes tracking through pull out parts i'm interested in - i'm drawing lot of blanks. originally, dead set on trying implement solution similar html agility alternative in c# except using tidy , other xml library maintain logic more or less same.

    this hasn't worked out well. xml library have access doesn't appear back upwards xpath , i'm not able install 1 does. i've resorted trying figure out way read through page using string matching find info want. can't help sense there has improve way this.

    here have:

    #define html_page "codes.html" int extract() { file *html; int found = 0; char buffer[1000]; char searchfor[80], *cp; html = fopen(html_page, "r"); if (html) { // error prone, if buffer cuts off half way through section of string looking for, fail! while(fgets(buffer, 999, html)) { trim(buffer); if (!found) { sprintf(searchfor, "<strong>"); cp = (char *)strstr(buffer, searchfor); if(!cp)continue; if (strncmp(cp + strlen(searchfor), "co1", 3) == 0 || strncmp(cp + strlen(searchfor), "co2", 3) == 0) { got_code(cp + strlen(searchfor)); } } } } fclose(html); homecoming 0; } got_code(html) char *html; { char code[8]; char *endtag; struct _code_st *currcode; int i; endtag = (char *)strstr(html, "</strong>"); if(!endtag)return; sprintf(code, "%.7s", html); for(i=0 ; i<data.codes ; i++) if(strcasecmp(data.code[i].code, code)==0) return; add_to_list(currcode, _code_st, data.code, data.codes); currcode->code = (char *)strdup(code); printf("code: %s\n", code); }

    the above doesn't work properly. lot of codes i'm interested in mention above, if buffer cuts off @ wrong spots miss some.

    i did seek reading entire chunk of html i'm interested in string wasn't able figure out how cycle through - couldn't codes displayed.

    does know how can solve issue?

    edit: i've been thinking more. there way can ahead in file , search end of each 'block' of text parsing , set buffer size before read it? need file pointer same file? (hopefully) prevent problem of buffer cutting off @ inconvenient places.

    okay, after much banging of head against wall trying come way create above code work, decided seek different approach.

    since knew info on page i'm scraping contained on 1 huge line, changed code search through file till found it. progress downwards line looking blocks wanted. worked surprisingly , 1 time had code reading of blocks, easy create minor modifications business relationship inconsistencies in html. part took longest figuring out how bail out 1 time reached end of line , solved peaking ahead create sure there block read.

    here code (which ugly functional):

    #define html_page "codes.html" #define start_block "<strong>" #define end_block "</strong>" int extract() { file *html; int found = 0; char *line = null, *endtag, *starttag; size_t len = 0; ssize_t read; char searchfor[80]; html = fopen(html_page, "r"); if (html) { while((read = getline(&line, &len, html)) != -1) { if (found) // found line codes interested in { char *ptr = line; size_t nlen = strlen (end_block); while (ptr != null) { sprintf(searchfor, start_block); starttag = (char *)strstr(ptr, searchfor); if(!starttag) { nlen = strlen (start_block); ptr += nlen; continue; } if (strncmp(starttag + strlen(searchfor), "co1", 3) == 0 || strncmp(starttag + strlen(searchfor), "co2", 3) == 0) got_code(starttag + strlen(searchfor), code); else { nlen = strlen (start_block); ptr += nlen; continue; } sprintf(searchfor, end_block); ptr = (char *)strstr(ptr, searchfor); if (!ptr) { found = 0; break; } nlen = strlen (end_block); ptr += nlen; if (ptr) { // ahead create sure have more pull out sprintf(searchfor, end_block); endtag = (char *)strstr(ptr, searchfor); if (!endtag) { break; } } } found = 0; break; } // find section of downloaded page care // next line read blob containing html want if (strstr(line, "wiki-content") != null) { found = 1; } } fclose(html); } homecoming 0; } got_code(char *html) { char code[8]; char *endtag; struct _code_st *currcode; int i; endtag = (char *)strstr(html, "</strong>"); if(!endtag)return; sprintf(code, "%.7s", html); for(i=0 ; i<data.codes ; i++) if(strcasecmp(data.code[i].code, code)==0) return; add_to_list(currcode, _code_st, data.code, data.codes); currcode->code = (char *)strdup(code); printf("code: %s\n", code); }

    not elegant or robust c# programme @ to the lowest degree pulls info want.

    c web-scraping

    How to make sure custom js file loaded last in joomla -



    How to make sure custom js file loaded last in joomla -

    i trying include custom js file joomla site. did edit template's index.php file, , add together <script src='custom.js"></script> right before </head>. when page loaded, there 2 other js files loaded after custom js file. thought inserting script loading line right before closing head tag, js file should lastly 1 load. perchance load 2 js files after js file, , how?

    try this,

    you can utilize addcustomtag alternative not load js file within head tag should lastly (from calling there load.)

    $stylelink .= '<link rel="stylesheet" href="../css/ieonly.css" />'; $document = jfactory::getdocument(); $document->addcustomtag($stylelink);

    for more details

    hope works..

    joomla

    c# - Transform LINQ to normal Foreach -



    c# - Transform LINQ to normal Foreach -

    i found below piece of code in 1 of our project. stuck 2 days :-( trying understand aggregate & linqkit expand.

    can help in transforming below linq normal foreach operation?

    public expression<func<purchase, bool>> fortarget(list<string> idlist) { expression<func<purchase, string>> fc = p => p.clientid; expression<func<purchase, bool>> predicate = m => false; homecoming idlist.aggregate(predicate, (p, id) => p.or(m => fc.invoke(m) == id), p => p.expand()); } internal class purchase { public int cost { get; set; } public string description { get; set; } public string clientid { get; set; } } public class client { public string id { get; set; } }

    or atleast, pointer on linq look doing on list, much helpful.

    return idlist.aggregate(predicate, (p, id) => p.or(m => fc.invoke(m) == id), p => p.expand());

    the function iterates on collection of items , builds predicate adding or status each clientid property value.

    in versions of linq2sql there no back upwards method contains weren't able perform query this:

    ienumerable<purchase> purchases = loadselecteditems(); var clientids = purchases.select( p => p.clientid ).toarray(); var results = db.clients.where( c => clientids.contains( c.id )); // did not work.

    the workaround problem create predicate check using or whether id match specific value. so, above example, if clientids = {1, 2, 3} where clause written as:

    var results = db.clients.where( c => c.id == 1 || c.id == 2 || c.id == 3);

    as can see, kind of statement not elegant, becomes unreadable when collection of values check against (i. e. clientids) big and, important, cannot know priori values hardcode them. so, overcome problem, solution generalize above predicate variable collection of values. , done next algorithm:

    create expression returns false; if homecoming true compiler short-circuit evaluation (because we're using or) , homecoming true items; for each item in collection of values add together or clause value of item.

    now, illustration can converted foreach way:

    // start predicate returning false // seed of aggregate method expression<func<purchase, bool>> predicate = m => false; // now, iterate collection , build total predicate foreach( var id in idlist) { // build predicate invoking function returns client id of // purchase , comparing value of current id idlist predicate = predicate.or(item => item.clientid == id); }

    hope helps.

    c# linq linqkit

    redquerybuilder - How can I update the targetId of a particular RQB element? -



    redquerybuilder - How can I update the targetId of a particular RQB element? -

    i have element on page, i.e.

    i add together rqb element with:

    redquerybuilderfactory.create({targetid:'foo1', meta:mymeta, onsqlchange:sqlchange, ontablechange:tablechange, enumerate:enumerate, suggest:suggest, editors : [ { name: 'date', format : 'dd.mm.yyyy' } ]}, sql, args);

    i alter id of containing div via $('#foo1').attr('id','foo2');

    how update targetid in rqb instance config 'foo2' matches containing div?

    i think targetid used 1 time when widget setup. phone call value can find here: https://github.com/salk31/redquerybuilder/blob/master/redquerybuilder-js/src/main/java/com/redspr/redquerybuilder/js/client/redquerybuilder.java#l58

    is there problem after alter id of element?

    redquerybuilder