Wednesday, 15 April 2015

sql server - What do all these "Save DTS Package" options mean? -


I am creating a DTS package after specifying the source, destination and tables, save, schedule, And package package , which has a Save DTS package checkbox.

  • SQL Server Meta Data Services
  • Structured Storage File
  • If I check to save the box,
  • Visual Basic file
  • Does anyone use this option to save my DTS package? What is the meaning, and what can its professionals and the opposition do? (Especially if you have experience with different options, and are not just regurgitating.)

    This

  • Structured storage file means a .dts file
  • The file is portable and standalone it can be run with dtsrun.exe And do not require full installs to run on the App server.

    The MSDB option means that you need access to the MSDB database but you can recover backup / restore capability.

    It depends on your setup and shop. I like the file option, but I'll use it as needed.

    I will not use these:

    • Visual Basic File: Once saved, you can not edit it
    • SQL Server Meta Data Services : Is it still applicable?

    Some more information on this has not been updated. SSIS has mostly changed DTS.


    Are there any good reasons NOT to use jQuery instead of plain old JavaScript? -


    I have recently detected jQuery, and I can immediately see how useful and elegant it is.

    I'm curious, though - there are no reasons to use it (and just use plain old javascript)? If there is no reason, should not it be fully integrated into the Javascript language?

    There is no reason to use it

    < Ul>
  • There are better libraries.
  • This page adds weight (and for small projects that the weight is often more expensive then the profit)
  • Is it completely in JavaScript Should not be included?

    Most of what JQuery does is, more than that related to DOM javascript.


    concurrency - What's the best way to divide large files in Python for multiprocessing? -


    I take part in many "embarrassing parallel" projects that I want to parallel with multiprocessing Module However, they often include reading in large files (over 2 GB), processing them on line line, running basic calculations, and then writing results to split the file and use Python's multiprocessing module the best way Or is it? Should multiprocessing be used in Q or joinable queue ? Or in the line module? Or, should I be replicated on a pool of processes using multiprocessing ? I have experimented with these methods but overhead on the basis of line is heavy in distribution I have settled on light pipe-filter design using the cat file Process1 --out-file out1 --num-processes 2 | Process2 --out-file out2 , which passes a few percent of the direct input of the second input (see) of the input first, but I want to put the solution contained in Python completely.

    Surprisingly, the Python documentation does not recommend a legal way of doing this (despite a long section on programming guidelines in the multiprocessing document).

    Thanks, Vince

    Additional Information: The processing time varies per line. Some problems are not fast and difficult to I / O bound, some CPU-bound CPU-bound, non-dependent functions will receive posts from parallel, such as inappropriate methods of assigning data to the processing function, even at the time of the clock It will be beneficial.

    A major example script that removes fields from lines, checks for a variety of bitwise flag, and with a few flags, writes a line with a new file in an entirely new format . It seems like an I / O bound problem, but when I went with the pipes with my cheaper concurrent version, it was about 20% faster when I run it with pool and map, or multiprocessing Queue is always 100% slow

    One of the best architectures is already Linux Is part of the OS. No special libraries are required.

    You want a "fan-out" design.

    1. A "main" program creates several subproductions connected by pipes.

    2. / Li>

    3. Each sub-publication should probably have a pipeline of different processes that read and write with stdin.

      You do not need queue data structure, it is an in-memory pipeline - a queue between bytes between two concurrent processes.


    How do I have jQuery's autocomplete plugin display its dropdown list upon page load? -


    प्रोग्राम को स्वचालित रूप से स्वत: पूर्णता सूची परिणामों के प्रदर्शन को ट्रिगर करने की कोशिश कर रहा है। यह, उपयोगकर्ता इनपुट की प्रतीक्षा करने के बजाय।

    क्या यह संभव है? (मैंने तत्व का फ़ोकस लेने की कोशिश की है, एक जावास्क्रिप्ट डाउन-एरो कुंजी इवेंट को बुलाते हुए। नहीं पासा)

    यदि, और केवल अगर, आप jQuery के एक संस्करण का उपयोग कर रहे हैं 1.3 या अधिक, आप एक वस्तु बना सकते हैं, फिर ट्रिगर () यह मैं केवल इसे काम करने में सक्षम था अगर तत्व भी केंद्रित है। तो यह कोड " ई-मेल (स्थानीय): " पर उदाहरण के लिए काम करता है।

      var e = jQuery.Event ("कुंजीडाउन"); E.which = 40; $ ('# सुझाव 13')। ट्रिगर ('फ़ोकस')। एट्रि ('मान', '') .ट्रिगर (ई);  

    मुझे यकीन है कि वास्तव में आपकी स्थिति क्या है, मुझे लगता है कि यह वास्तव में कुछ दिखा रहा है कि केवल एक जगह दबाए जाने पर स्वत: पूर्ण पर निर्भर है। यह हमेशा मामला नहीं होता है।


    Can Entity Framework map two associations into a single navigation? -


    मेरे पास दो साधारण टेबल हैं, जो यहाँ वर्णित हैं ...

      तालिका = व्यक्ति PersonID Int, primarykey) FirstName (char) LastName (char) तालिका = संबंधित संबंधित आईडी (इंट, प्राइमरी) Person1 (इंट, फ़ॉरवर्ड के लिए Person.PersonID) Person2 (int, ForeignKey for person.PersonID) रिलेशनशिप (इंट)  / Pre> 

    व्यक्ति के लिए उत्पन्न इकाई में दो नेविगेशन संग्रह हैं संबंधित के लिए एक। मुखौटा 1 और संबंधित के लिए दूसरा। यह एक दर्द है क्योंकि इसका मतलब है कि मेरे पास उन दो रिश्तों को देखने के लिए दो संग्रह हैं जो उस व्यक्ति के लिए प्रासंगिक हैं।

    मुझे इसके बजाय केवल एक नेविगेशन संग्रह की आवश्यकता है जिसमें इन दोनों सेट्स शामिल हैं। क्या यह इकाई फ़्रेमओर्क के हिस्से के रूप में उत्पन्न होना संभव है? एकमात्र विकल्प एक तिहाई संग्रह खुद बनाना है, जिसमें कुल मिलाकर संस्थाओं का समूह होता है और ऐसा लगता है कि इसकी आवश्यकता नहीं होनी चाहिए।

    के रूप में क्रेग कहते हैं कि आप क्या पूछ रहे हैं ईएफ के लिए कुछ प्रमुख नहीं है, लेकिन ... दोस्ती के प्रकार का संबंध उन खराब मॉडलों में से एक है, इसलिए मैं देखता हूं कि आप क्या करने की कोशिश कर रहे हैं।

    एसएसडीएल में एसोसिएशन सेट को सेट करने के लिए (परिभाषित करना) मैप करके यह संभव बनाने के लिए एक वैकल्पिक उपाय है।

    इस दृश्य / केवल इसलिए, आप शायद दूसरे दो रिश्तों को जगह में छोड़ना चाहें ताकि आपको सही संग्रह से जोड़ने / निकालने की अनुमति मिल सके, जब आप एक ही दिशा में खोज करना चाहते हों।

    इस पोस्ट को शामिल करें अधिक के लिए।

    उम्मीद है कि यह मदद करता है

    एलेक्स


    java - converting a numeric cell type into a text cell type in ms excel document without changing contents of the cell using open office -


    How to type a numerical cell type in text cell type in MS Excel document without changing the contents of a cell using the open office Change. This cell value is then accessed by using the method of Java (POI JAR getRichStringCellValue () HSSFCELL object.)

    Try it:

      HSSFWorkbook wb = ...; Data Format Format = wb.createDataFormat (); HSSFCellStyle cell style = wb.createCellStyle (); Style.setDataFormat (format.getFormat ("@")); // or "text" cell.setcel style (cellstyle);  

    Multiple Forms vs 1 All-Encompassing Form? -


    I'm writing a YouTube reply / comment type wall on my website. This allows users to post a new comment on the wall, or to answer any existing comments on the wall.

    Is each comment recommended to create a separate form for the comment box? Or is it better to create only 1 form on the page, in which to submit all the input / element, and then use the code to find the form that submits the user code?

    This question is not really about this particular application, but just normal coding best practices are thanks!

    ps - I am using jQuery / Ajax

    best thing Doing is to use different forms till you are not using ASP.net, you are already inside a huge size.


    networking - A clean, lightweight alternative to Python's twisted? -


    A (long) While I first wrote a web-spider, enabling concurrent requests at the same time For I have multithreaded It was in my Python youth, before I knew about it and made the difficulties related to it for multilingual code (IE, most of the time the CRILIZED ends!) ...

    D wants to recreate this code so that it can be made stronger and perform better. There are basically two ways that I could: I could use new in 2.6+ or I could go for some kind of reactor / event-based model. I want to do this later because it is very easy and less error prone.

    The question is, what structure would be most appropriate for my needs is a list of the following options that I still know:

    • : The structure of the Python reactor Grandpa: Looks complicated and looks a bit bloated. Sharp learning to learn for small tasks
    • : The greenlet-based framework that was ready for this type of work. Although I look at the code and it is not very beautiful: non-PEP 8 compliant, scattered with print (why do people do it in a framework?), The API seems a bit incompatible.
    • : Immature, it still does not seem to be used by anyone, although it is based on libevent, so she has got a solid backend.
    • : from stdlib: über low level, to get something from the ground.
    • : Although it is a server-oriented product that is designed for server dynamic websites, it offers one more simple feature. It seems that it could work, but no, what to do for it. [EDIT: Unfortunately not running on Windows, which it counts for me - I need to support this lame platform)

    Do not I miss anything? Surely there should be a library which fits the sweet spot of a simplified async networking library!

    [edit: Many thanks for its suggestion if you scroll down, then you will see that there is a very good list of projects that are aimed at dealing with this task in some other way or another. In fact it seems that things have actually been transferred since twisted: people now seem to support a base solution instead of a conventional reactor / callback oriented one. The benefits of this approach are clear and clear codes: I have certainly found in the past, especially when working in C ++, the callback based code can lead to those designs that can be hard to follow and untrained. The eyes are relatively obscure. Using co-routine, you can write code that looks at least a small synchronous. I think my work is that I want to see one of these libraries and work to go to it! I just asked ...]

    [edit] Perhaps it is a matter of following or stumbling upon this subject or worrying about it: I am writing a very good writing of the present situation Found for this job]

    I liked Python module that was stackless on Python microthrads or greenlets Depending on weight threading, all the blocked networks I / O transparently have a loop, so it should be efficient as an actual asynchronous server.

    I think this is similar to the event store in this way.

    The downside is that its API differs significantly from Python's socket / threading module; You must rewrite a reasonable bit of your application (or write a compatibility shim layer)

    Edit: It seems that there is also, which is similar, but Python 2.5 uses the enhanced generator for its correlation instead of greenlets, making it more portable than the consent and other options, the network I / O is directly done with Ipol / Keku / IoPp.


    file - Directory contents diff -


    I am looking for existing ideas / solutions for the problem of finding the difference between the two directories. Specifically how to identify files that have been changed, their names can be changed and moved.

    A small list of the things I have considered:

    • With 75% of the matches in the content such as some estimates, with new files in DI B It does not seem sufficiently adequate (Problems with the problem include: Potential changes in content, compression or encryption, possible multi-match)
    • Use alternative data streams to add an ID to each file Will work only on NTFS only.
    • Add header / footer to each file and there is no way to guarantee adding header / footer, will not corrupt the file.
    • To determine whether the file has been actually moved or simply moved, ask user input for each change, it is very difficult on the user.
    • Using a special order requires a user to simply rename / move files, which will keep track of such changes, it is very difficult on the user.
    • Setting up a file system watchcher to capture changes to the flight

    Any ideas are welcome ...

    < P>

    I have some kind of distributed version control system such as git

    , It can recognize all files very much like Operations such as copies, moves, rename, ...


    Daily countdown ticker php -


    Does anybody have an idea about how to make a countdown ticker that is a reasonable time of day and time And shows the minute a weekend (Saturn and Sun) remains on Monday until 16:30.

    It has stumped me and can actually do this with some points.

    Thanks, b.

    If you want to count the page in each second, instead of refreshing it, you use javascript should do. There are many, and other javascript can be found by using Google search for countdowns

    If you want to do it in PHP, then the Unix timestamp The best way to get, and by value.

    Find the difference, and then you can calculate the remaining time:

      $ diff = mktime (...) - time (); $ Day = floor ($ diff / 60/60/24); $ Hour = floor (($ $ diff - $ days * 60 * 60 * 24) / 60/60);  

    etc.

    Edit

    Javascript ...

    Original Idea

    var date = new Date (); // gets now var weekdays = date.getDay (); // Current day / Sunday is Sunday. 6 is Saturday (day of week == 0) {date.setTime () (date.getTime (+ 60 * 60 * 24); // Increase time of one day} if (day of week == 6) {date.setTime () (date.getTime (+ 60 * 60 * 24 * 2); // Increase time up to two days) // We already have to check that passes at 16:30, if ((date.getHours () == 16 and date.getMinutes ()> 30) || Date GetHours ()> 16) {// If we have, increase the date of the day .setTime () (date.getTime (+ 60 * 60 * 24)) date.setHours (16); Date.setMinutes (30); // Now the date is the time we want to count down, which we can use with a jquery plugin

    sql - Merge virtually two mysql tables -


    Is there a way to merge two tables into MySQL, so that I enter queries and data?

  • Active
  • foo
  • What would I like to do , Like something like sql-join

      in the table SET active IN = 1, language = 'n';  
  • Assuming you are on mySQL 5.1.x, here's what key But in relation to an insertable or updateable view.


    linux - Subversion 1.6.6 Error "Could not open the requested SVN filesystem" -


    I am running Ubuntu Server with Subversion 1.6.6.

    In Windows I compiled against the latest Turtle SVN Subversion 1.6.6.

    I am creating a new repository and when I try to view the repository or import my files and get the following error:

    "Requested SVN filesystem"

    I can see the repository through the command line (in the form of root), but I want to see them in turtle. Some repositories are fine and I can see and commute through turtles without any problems.

    I'm sure this is a user / permission thing, but it's not sure where to see me?

    Any suggestion is very acceptable.

    Thanks

    How do you use the repository on your server? If you are using the file: ///, which will not work because the repository format is not compatible between the OS, if you are already using svn: // or http, then you can access the repository Svn: // or http (s): // (and set up the related server app).

    : To access the repository, you can see the Apache error log or you can run svnserve in console mode to get a more detailed error message.

    Full reading / server (svnserve or apache) for the user running your repository.


    terminology - Definition of the word "patch" -


    Personally, I use the word "patch" as the equivalent of software, which patch a patch Quick- and dirty bugfix However, I'm not sure that this is correct, because I often see that it is used in other ways, for example, the option of program updates.

    What is the meaning of the word "patch"? / P>

    Update : I think the vocabulary matters a lot, because it is a fundamental aspect of documentation and communication, and so in general software development. The problem is that computer language is loosely defined , and I do not know which word provides fixed reference so I thought it was on this stack overflow here There was a good idea to ask.

    From:

    A patch is a piece of software program Which is designed to fix, or update problems with a computer program or its support data. This includes security vulnerabilities and other bug fixes, and improves applicability or performance. Although fixing problems means poorly designed patch can sometimes present new problems (see software regression).


    html5 - Online Photoshop via HTML 5's Canvas? -


    Does any editor like Online Photoshop use canvas? I know at least 4 flash editors, but I'm interested in a search based on a canvas.

    Those two I know about:

    • : Pixstick Is an experimental photo editing app developed by Yakub Cedeline. It is only javascript and & lt; Canvas & gt; element uses the browser support currently limited to Firefox, Opera and Safari
    • : The nearest pixel-perfect copy of Microsoft Paint in HTML, CSS and JavaScript is specified by WHATWG and Safari 1.3 Supported by & lt; Canvas & gt; Using the tag, Firefox 1.5 and Opera 9

    php - English to Time -


    Is there a good class / library address to represent English in timestamp?

    The goal is to convert natural language phrases such as "ten years from now" and "three weeks" and "in 10 minutes" and the best match for them is to do Unix timestamps.

    I go to some pretty poor and untouched code, but I'm sure there are very good parsers for the calendar and in such a way.

      on private function tile ($ timestard) {$ candidate = @strtotime ($ TIMESTRING); If ($ candidate & gt; time ()) will return the $ candidate; // let's have a bash on php // $ thisyear = date ("y"); If (Strip ($ timestring, "minute")! == incorrect) // reference minute is {$ nummins = preg_replace ("/ \ D /", "", $ timeline); $ Candidate = @trotoime ("now + $ nummins min"); $ Return; } If (SRPO ($ timestring, "yes")! == incorrect) // reference hour is {$ numhours = preg_replace ("/ \ D /", "", $ timeline); $ Candidate = @trotoime ("now + $ numhours hour"); $ Return; } If (strips ($ timestring, "day")! == incorrect) // is reference day {$ numdays = preg_replace ("/ \ D /", "", $ timestard); $ Candidate = @strtotime ("now + $ numdays days"); $ Return; } If (strips ($ timestring, "year")! == incorrect) // reference year (2 years) {$ numyears = preg_replace ("/ \ D /", "", $ timestring); $ Candidate = @strtotime ("now + $ numyears years"); $ Return; } If (strangel ($ timestring) <5) // 10th || 2 (or maybe a number) {$ day = preg_replace ("/ \ D /", "", $ timestard); If ($ day> 0) {$ month = date ("m"); $ Year = date ("y"); Return Stratetime ("$ Month / $ Day / $ Year"); } Other {return false; }     }      return false; // no one could. }  

    Use the square.

    Example:

    $ string = 'Four days ago'; $ D = date_create ($ string); $ D & gt; GetTimestamp ();

    ETA: which you can extend:

      class myDateTime provides the date of the date {static $ defined_expressions = array (...); Function __ conversion ($ expression = null) {if ($ exp = $ this-> translate ($ expression)) {Original: __ Construction ($ EXP); }} Function translate ($ exp) {// Check if strtotime errors to see or not // If these are errors, check that the $ exp matches a pattern in itself: $ defined_expression $ exp, modified $ Exp or false}}  

    sql server - Large table with no rows? -


    I have a SQL Server 2005 database that includes several tables in large amounts (more than 10 GB), and these They do not have any row in the tables. I can see location and line count with right-click, properties (data space and line count items).

    Any thoughts?

    The transaction log and data file is not deleted when the data is removed, the notion that you ' You will use it again if you really need it, you can use DBCC SHRINKFILE and / or DBCC SHRINKDATABASE to retrieve it.


    arrays - PHP: get all method names from an object with name "bla_" -


    I have an object and want a method that gives this object the way to start with "bla_" is.

    I found get_class_methods () which gives all the names of the names, but I only want those names that are "bla _"

    You can use them to filter:

      $ method_names = preg_grep ('/ ^ bla_ /', get_class_methods ($ object) );  

    java - Busy graphic on a tab of a JTabbedPane -


    Is anyone aware of any open source implementation of JTabbedPane in which I have a busy graphic (called spinning ball) Set the tab, while I load something in tabs - like the spinner on the Firefox tab

    I realized that I can create an animated GIF and set it as an icon on the tab - but I was hoping something like that was already done.

    Netbeans support busy sign-ups when you create a new desktop application
    I zipped them and uploaded them.
    This is it.

    With this icon you can update the icon by calling a thread witch.
    JTabbedPane.setIconAt (Int Tibbon, Icon Icon);
    See the documentation documentation.

    Hope this helps


    clr - Managed C++ to form a bridge between c# and C++ -


    I'm a bit wild, actually in fact my C ++ is cut off since the Freshman year of the college It has not been touched, so it's been a while.

    Anyway, I'm doing the things that most people do, behind it. Calling C # code from C + code I have done some research online and it seems that I need to create some managed C ++ to create a bridge using __declspec (dllexport) and then create a dll and cover it Use the whole thing as.

    But my problem is - for example, I really have a hard time. I found some basic things where a C # version wanted to be used in the string. Toopper (), but it was very original and only had a small code snippet.

    Anyone have any ideas, where can I find something a little more concrete? Note, I do not want to use COM, not to touch the target C # code at all.

    I'll just post it anyway ...

    to your library The process of writing a cover is similar to reaching a standard .NET library.

    Example C # class code in a project named CsharPProject:

      using the system; Namespace CsharpProject {public class CsharpClass {public string name {get; Set; } Public int value {get; Set; } Public string GetDisplayString () {return string.Format ("{0}: {1}", this.Name, this.Value); }}}  

    You can create a managed C ++ class library project (eg CsharpWrapper) and add its C # project as its reference. In order to use the same header file in internal use and referenced projects, you need to use the correct declayspec by defining a preprocessor instruction (in this case CSHARPWRAPPER_EXPORTS ) and Using a #ifdef to set the export macro in the header file in your C / C + interface. Unmanaged interface header file should contain unmanaged content (or it is filtered by the preprocessor).

    Unmanaged C ++ interface header file (CppInterface.h):

      #pragma once #include & lt; String & gt; // sets the decoration of the interface function as export or import #ifdef CSHARPWRAPPER_EXPORTS #define EXPORT_SPEC __declspec (dllexport) #else #define EXPORT_SPEC __declspec (dllimport) #endif // Unencrypted interface functions all unmanaged types EXPORT_SPEC std :: string GetDisplayString (const Char * pName, int iValue);  

    Then you can create an internal header file to include in your managed library files. This will add to the namespace statement statement and it may include helpful functions that you require.

    Managed C ++ interface header file (CsharpInterface.h):

      #program once #include  

    Then you just type your interface code which does the wrapping.

    Managed C ++ interface source file (CppInterface.cpp):

      #include "CppInterface.h" #include "CsharpInterface.h" std :: string GetDisplayString ( Const char * pName, int iValue) {CsharpClass ^ oCsharpObject = gcnew CsharpClass (); OCsharpObject-> Name = ToManagedString (pName); OCsharpObject-> Value = iValue; Return ToStdString (oCsharpObject-> GetDisplayString ()); }  

    Then include unmanaged headers in your unmanaged project, tell the link file to be used when linking the linker and make sure the net and the casing DLL are in the same folder. As an unmanaged application

      #include & lt; Stdlib.h & gt; // wrapper header # include "CppInterface.h" void main () {// unmanaged wrapper function std :: string strDisplayString = GetDisplayString ("Test", 123); // Do something with printf ("% s \ n", strDisplayString.c_str ()); }  

    Best Practice to get related values in django without DoesNotExist error -


    If I have two models:

      class blog (models.model): author = Model Kharefild () Class Post (model.model): blog = model Forinki (blog)  

    And I have to get all the posts for a given blog:

    blog.objects.get (author = 'John'). Post_set

    If the author has a blog with = 'John' but not posted, a DoNotExist exception is raised. What is the best solution? I can try one thing: Except: On the front-end, a custom manager method, or there is normally a way to override Django to return a blank set. For my purposes, DoesNot does not exist.

    Alternatively, the entire issue can be pressed like this:

      blog.objects.select_related ('post'). (Author = 'John'). Post_set.values ​​()  

    You can also avoid Post. Error by using objects.filter (blog__author = 'John')


    wordpress - show/hide ajax? javascript toggle -


    I'm looking for a WordPress plugin that will start when I click on an arrow image Hides a ajax feature pops

    Is there a plugin that can do all this?

    A hide-and-seek feature is included in the bottom of the page along with me in a contact form. The pages have to be editable for my clients, so it is impossible for me to create this theme in the javascript function should be part of a page. I've found WP ShowHide elements but it does not allow me to do this with many divs in the same placement.

    Here are some scripts I am using in my pages as permitted by the plugin

       

    Thank you for your help

    Judy

    Please note the sidebar on this website, I am trying to get it But inside the main page content

    This small script works within a page, but I want a swap division effect. How do I use it to work with Multipe divs? - I use the same location or div

       & Lt; / Script & gt; & Lt; / P & gt; & Lt; P & gt; & Lt; One onclick = "toggle_view ('foo');" Href = "#" & gt; Element # foo & lt; / A & gt; & Lt; / P & gt; Click here to toggle the visibility of & Lt; Div id = "foo" & gt; This foo & lt; / Div & gt; & Lt; P & gt; & Lt; One onclick = "toggle_view ('too');" Href = "#" & gt; Click here to toggle visibility of the element & lt; / A & gt; & Lt; / P & gt; & Lt; Div id = "lot" & gt; This is also & lt; / Div & gt;  

    I think I may have solved my problem :) It would be nice to know that anyone can modify it, so on page 1 load the first diva is already Open

      & lt; P & gt; & Lt; Script type = "text / javascript" & gt; Lastone = 'empty'; Function showIt (lyr) {if (last! = 'Empty') lastone.style.display = 'none'; Lastone = document.getElementById (LYR); Lastone.style.display = 'block'; } & Lt; / Script & gt; & Lt; / P & gt; & Lt; P & gt; & Lt; A href = "javascript:;" OnClick = "showIt ('dividend')" & gt; Link & lt; / A & gt; & Lt; / P & gt; & Lt; Div id = "divid" style = "display: none;" & Gt; Content & lt; / Div & gt; & Lt; P & gt; & Lt; A href = "javascript:;" OnClick = "showIt ('new')" & gt; Link & lt; / A & gt; & Lt; / P & gt; & Lt; Div id = "new" style = "display: none;" & Gt; Content & lt; / Div & gt;  

    To answer your edit: You can not delete the display only: Someone Not even the original div?

    If you need to do it in javascript, then chalk a Show ('divID'); Line after your function.

    To do this correctly, add it to the window. Load:

      window.onload = showIt ('divID'); 


    c# - Finding a wave graphic inside an image -


    itemprop = "text">

    I need some help with an algorithm. I am trying to read an electrocardiogram using an artificial neural network and identify some disturbances in the waves. It's okay, and I have a neural network and I can check it out no problem.

    What do I want to do that is to find an electrocardiogram program (JPG) to search the waves and convert it to my ANN fed feeder, but the problem is I gave some code Reads and converts it into a binary image, but I can not find a good way to program the waves, because the exact position May differ from Sptal the hospital, I would suggest a couple of approaches should I use.

    If you get a wave value in the list, then you can use Fourier for a specific time value To determine frequency content on transform or FFT (Fast Fourier Transform) Disturbance usually creates additional high-frequency content (i.e. sharp, fast waves) that you should be able to use to see irregularities.


    jquery select checkbox by div -


    I'm wondering if there is a way to check / uncheck a check box in jQuery, when one of the whole devices Clicks on the layer.

    Any thoughts?

    Here's an example ... I'm trying to create a clickable checkbox to toggle the personal checkbox, pretty much.

    & lt; Fieldset & gt; & Lt; Div & gt; & Lt; Input type = "checkbox" id = "checkbox 1" /> & Lt; / Div & gt; Person 1 & lt; Br / & gt; & Lt; / Fieldset & gt; & Lt; Fieldset & gt; & Lt; Div & gt; & Lt; Input type = "checkbox" id = "checkbox 2" /> & Lt; / Div & gt; Person 2 & lt; Br / & gt; & Lt; / Fieldset & gt;

    Perhaps use the clicked div as a parent

      $ (function () {$ ('# divId'). Toggle (function) {$ (this) .find ('input'). Attr ('checked', true);} , Function (event) {$ (this) .find ('input') .ttry ('check', false);});});  

    This only checks the box of #divId which has been clicked.


    subsonic3 - How do I setup my POCO's with Subsonic 3 and the SimpleRepostitory? or where is the convention? -


    Is there a place that can be used to establish your Poko when using SimpleRepository with Subosonic 3? It seems that the conference is over the configuration, but I do not know that the conference has been explained.

    It seems that it was for 2.0, and also incomplete (BTW: I would like to help re-organize Docs again in 2.0 and 3.0 because the current docs are a bit confusing on which version

    For example, I want to know how to

    go about establishing one-to-one relationship

    User & Lt; => Profile

      instead of a class user {ID ProfileId} profile? Or is profile profile possible? } Users instead of Class Profile {ID UserId? Or user user possible? }  

    One-to-many relationship

      class user {id IList < Post & gt; Postal (?) Or IILIT & lt; Int & gt; PostIDs (?) Or is it contained in some way? Or is this just wrong? } Is class post {User ID instead of user ID} or user user possible? }  

    Many-to-many

    I'm guessing that I will need to setup many tables for many tables?

      Class User {IList < Blog & gt; Blog (?) Or IILIT & lt; Int & gt; BlogIds (?) Or is it contained in some way? } Class Blogspeople {// Do I have to make this class? UserId BlogId} Class User {IList & lt; Users & gt; User (?) Or IILIT & lt; Int & gt; UserIds (?) Or is it contained in some way? }  

    In the example solution it does not seem that these are set, so I'm thinking how you want to go about doing (Example of income of my estimate) :

    One-to-One

      User.profile r Single & lt; Profile & gt; (P = & gt; P. user == user id);  

    Parents have one-to-many

      posts. User ID = R. Single & lt; Post & gt; (Post ID). User ID; R.Single & LT; Users & gt; (Id); // What kind of smells with two questions?  

    Children from one-to-many

      User.Posts r.Find & lt; Post & gt; (P = & gt; p.UserId == userId)  

    or many-to-many

      User.Blogs id = r.Find & lt ; Blog User & gt; (Bu = & gt; bu.UserId == userId); R. Search & lt; Blog & gt; (B = & gt; b. Blog id == ID); // Again with two questions? :) Blog User ID = R. Search & lt; Blogsparices & gt; (B = & gt; bu.BlogId == blogId); R. Search & lt; Users & gt; (U = & gt; u.UserId == ID); // Again with two questions? :)  

    I must have thought that there should be a way of not having two questions and these qualities can be done in some way by getting already healthy. The truth can be said, though I had an hour to play with everything last night, so I'm screaming a little bit about Rob, screaming at me, forgive me! : P

    If these are not free, then where are the 3.0 and store processes? Please give me a link to those people, when you are a colleague on that.

    This is probably your best place to start:

    Relationships The codes are set up by you, and we do not do those forwarded db (nevertheless - hopefully soon). Ideally you set up according to your model needs and when you are ready, "strengthen" your relationship with DB. It is to reduce friction during development - data integrity is actually about making a site There is nothing to worry about.

    He said, I know that people want this facility - I need to make it.


    validation - Cleanup PHP String from Web Form Input -


    I have a web-form that receives customer information form is processed using PHP 5.1.6 So that using filter_input () will not work.

    This form has a text field with some other standard fields. I am getting a lot of strange formatting codes that are being stored in our MySQL database. How can I filter these results where they String formatting?

    Before this

    Where is the child's room? I think it's on the north side of the house Do you know where it is?

    Later (this is what I have to see)
    Where is the child's room? I think it's on the north side of the house Do you know where it is?

    This is almost certainly cut-and-paste from someone due to the incompatible character set.

    Looks like they're doing it with Microsoft Word, which uses non-ASCII unicode symbols for quotation and speech mark instead of the usual friendly ASCII. UTF-8 encodes as a series of two or more bytes from 80-FF, but often web pages are set to "Latin-1" which considers those bytes as separate letters, usually A -Jade with Accent If you see 2 or 3 characters, where you expect, and there are strange Latin symbols with some accents, then almost is always your data UTF-8, but it's in Latin Presented by some -1

    An exception occurs when it was typed in UTF-8 and first place required as Latin-1, make sure your HTML form is clearly a character

    In general, I do not advise you to use your web-based tool "UTF-8", without any good reason

    Update: This is a little bit icky, but I recommend that you do not worry too much about database charsets. In fact, we should just miss UTF-8, but if you put UTF-8 data in the Latin-1 table, then whatever comes back will still be UTF-8, unless someone asks the database What is he sending you what I am saying is that due to the problem with MySQL, it is not possible that it is your code to read with cut-and-paste, browser, web form, form and writes to DB, Or is it possible, your Try reading the DB and render the HTML

    iffy test page character encoding of characters. Try to install it on UTF-8 or to force UTF-8 in the browser. See Firefox-> Character Encoding in Firefox


    Some unit tests failed when migrating project from asp.net mvc 1.0 to asp.net mvc 2 beta -


    जब मैं स्टीव सैंडरसन के प्रो asp.NET MVC फ्रेमवर्क से एम्पल 1.03 एमवीसी 2 बीटा से नमूना स्पोर्टस्टोर ऐप चला गया , सबकुछ ठीक काम करता है - 2 यूनिट परीक्षणों को छोड़कर।
    दोनों पर त्रुटि संदेश है:
    टेस्ट.कार्टकंट्रोलरटिस्ट्स.वैललेगटस्टमप्रणाली:
    सिस्टम .अबर्टनल एक्सडेस्टेशन: मान को अनिर्धारित नहीं किया जा सकता।
    पैरामीटर का नाम: संदर्भ

    मुझे यह संदेह है क्योंकि संस्करण 2 में डिफॉल्ट मॉडल बाइंडरर डेटाएनेटेशन का समर्थन करता है, क्योंकि NUnit से स्टैक कॉल ट्रेस ने मुझे डिफ़ॉल्ट मॉडेबल बिन्डर में कुछ समस्याओं के बारे में बताया था। कोई भी विचार मैं इसे कैसे ठीक कर सकता हूं?
    संपादित करें
    समस्या का समाधान करने के लिए Moq का उपयोग करने की कोशिश की, लेकिन यह काम नहीं करता। यहां कोड है:

      var अनुरोध = नया Moq.Mock & lt; HttpRequestBase & gt; (); अनुरोध .सेटअप (आर = & gt; आर.एचटीटीपी मेथ)। रिटर्न ("पोस्ट"); Var मॉक एचटीटीपीकॉन्टेक्स्ट = नया मोक। मॉक एंड एलटी; एचटीटीपीटीन्टेक्सबाज़ & gt; (); MockHttpContext.Setup (c = & gt; c.Request)। रिटर्न (request.Object); नियंत्रक कंटेक्स्ट = नया नियंत्रक कंटेक्स्ट (नकल एचटीटीपी कॉन्टेक्स। ऑब्जेक्ट, नया रूटाडेटा (), नया मोक। मॉक एंड लेफ्टिब्स; कंट्रोलरबेस & gt; ऑब्जेक्ट);  

    विधि मैं परीक्षण कर रहा हूँ केवल पोस्ट सबमिट करें क्या मुझे अपने परीक्षणों में "पोस्ट" डालना ठीक है?

    इसे एएसपी.नेट में काम करने के लिए एमवीसी 2 आपको एक डमी नियंत्रक कंटैन्टेक्स बनाना होगा और इसे अपने यूनिट परीक्षण के आंतिकरण (या "सेटअप" या "व्यवस्थित करें") अनुभाग में अपने नियंत्रक पर सेट करना होगा।

    यहां एक उदाहरण है कि कैसे एक डमी बनाने के लिए Moq लाइब्रेरी की सहायता से नियंत्रक कंटेंट:


    php check if file exist -


    Can anyone tell me how the file is already present in the database or it is not told before uploading it ?

    I want to upload a file to the database, but before saving it, I have to check that whther file already exists first. If so, do not execute insert.

    I have used it on uplaoding a file.

    Thank you very much.

    I'm not sure that this is what you are asking, but do you have functions in PHP, Use File_exists (Absolute-Path-to-File)?

      $ exists = file_exists ('myfile.doc'); If (! $ Exists) {// your processing}  

    If you are checking the database, just to call your file which Also ask columns Example:

      Select from my table WHERE my-column = 'my-uploaded-file-name';  

    java - How do I use a script's output in an Ant Conditional -


    I want to do something like the following

      & lt; Target name = "complex-conditional" & gt; & Lt; If & gt; & Lt; Exec command = "Python-Python-script- Thats-return-true-or-flowers-string-to-out-o-flowers-string-to-fast-wiff-fashion -string-to-standout.py />> Then & gt; Echo Message = "I did a while" />  

    How & gt; & lt; / l> Does the ant conditional I evaluate the result of executing some scripts inside?

    In this there is outputproperty , error implant and result The parameter parameter allows you to specify the property name in which to store the command output / errors / result code.

    You then have one (or more) in your conditional statement, Can use:

       command = "dragon" - some-python-script-she-return-true-or-wrong -strings-to-stout.py "outputproperty = "Myout" resultproperty = "mycustom">> gt;> if & gt; & lt; equals arg1 = "$ {myresult}" arg2 = "1" /> Gt; then & gt; and lieutenant, echo message = "I did a while" /> & Lt; / Then & gt; & Lt; Rest & gt; & Lt; Echo message = "I did something else" /> & Lt; / Left & gt; & Lt; / If & gt;  

    unit testing - Generate custom test result in Visual Studio 2008 -


    I'm expanding some unit tests and I'm not sure what I want With Visual Studio 2008 .

    Actually, I am scanning some sections and for each of them, I want to know whether this class is a syllable and if it has a default constructor

    See all in the test results section of the sections I tested and if the test is successful

    Therefore, if I have 325 sections I'm scanning 325 in the panel of my test results. Should Rvishtian.

    Is this possible with Visual Studio 2008, and if it is positive, then how do I

    Okay, I did not detect my first choice, but I found some interesting facts for me.

    I'm just using the console. WrightLine (myStringBuilder.ToString ());

    It shows very good ly in test result.

    See:


    javascript - Check if a key is down? -


    Is there a way to find out that a key is currently down in javascript?

    I know the "keydown" incident, but it's not what I want. After some time the key is pressed, I want to know that it is still suppressed.

    P.S. The biggest issue is that after some time the key begins to repeat, closing the keydown and clamping down like an innocent. Hopefully there is only one simple keydown (key) function, but if not, then this problem should be removed / worked.

    Is there a way to find out if a key is currently down in javascript?

    No. The only probability is monitoring each funnel and keydown and remembering.

    Repeat the key after some time, a key like closed keydown and frustrated events.

    It should not be done. You will definitely repeat keypress , and in many browsers, you get repeatedly keydown , but if keys repeats, this is a bug

    Unfortunately, this is not completely unheard-bug: Linux, Chromium, and Firefox (when it's being run under GTK +, which is in popular sales like Ubuntu) Key-keypage to organize keys - keying sequence, which Kill rapidly key in Tv that are impossible to distinguish from.


    sql - MySQL - Oddities when doing a count, that I can't explain -


    By doing a simple query, I get two very different results, and I'm not sure how I come to it. I am conclusion. Below are the examples given below, please tell me if I'm just looking at some of this ..

      select b.fkid as t, b.timestamp, count (b.fkid) form of hit In the form of numbers (different (BFKID)), DATE_FORMAT (BTM Stamp, '% Y-% M-% D') AS VAL 1 to A, B. WHERE a.id = B.F.Ked Group Val 1  

    ... Result:

      2 2009-09-25 08:33: Compared to 42 ** 27 ** 3 2009-09-25  

    ...:

      Select b.fkid as t, b .timestamp, count (b.fkid) as the hit, counting (separate (b.fkid)) Num, DATE_FORMAT (b.timestamp, '% Y-% m-% d') A, val1 a, b, wheré a.id = b.fkid group by t  

    .. results :

    2 2009-09-25 08:33:42 ** 39 ** 1 2009-09-25 3 2009-09-25 08:36:59 ** 6 ** 1 2009-09-25 10 2009-09-25 22:40:14 ** 4 ** 1 2009-09-25 I do not know 39 + 6 + 4 = 27? I expect the first value to be 49 to 27. Also tried:
      Select as BFKID T, b.timestamp, count (b.fkid) as the hit, count (b. Fkid)) As a num, from val1 to A, B. WHERE a.id = b.fkid group val1  

    ... which produces:

      2 2009-09-25 08:33:42 27 27 2009-09-25 from  

    from below The following recommendation I tried to eliminate irrelevant data and created the query:

      Number of hits, count (differently (B.FKID)), DATE_FORMAT (b.timestamp, '% Y -% m-% d ') As val1 from A, B. WHERE a.id = b.fkid group val1  

    ... generated from:

      27 3 2009 -09-25  

    I tried to lower it down:

      hit count as SELECT count (b.fkid), count (different ( BFKID), A, B, WHERE a.id = b.fkid group DATE_FORMAT (b.timestamp, '% Y-% m-% d'))  

    ... generated from this:

      27 3  

    and:

      select counts . Fkid) in the form of a hit, in the form of counting (differently (B.FKID)) as a number from B. WHERE a.id = b.fkid group b.fkid  

    ... produced it:

      39 1 6 1 4 1  

    In SQL, you should be a group of groups in all areas that are not aggregates, not just Val 1

    MySQL lets you move away from not doing this (most other databases will throw an error) but this can leave you with this unexpected behavior in this way, especially if val1 is a composite produced by you Does not recognize it separately. / P>


    sql - Update via subquery, what if the subquery returns no rows? -


    I am using a subquery in an update:

      update table is a SET X, Y, Z = ((SELECT x, y, z to tableB b, where tableA.id = b.id and (tableA.x! = Bx or tableA.y! = OR OR tableA.z! = Bz))) ;  

    My question is, what if the subquery does not give any rows? Will this make an update with the tap?

    Second, this is a better way of writing. I am basically updating three areas from tableA to tableA, but only if there are three fields different.

    What if the subquery does not give a line? Will it update with a tap?

    Yes - you can test like this:

      set your tab col1 = (1 select where 1 = 0)  

    This will fill the col1 with NULL if the subquery gives multiple rows, such as:

      set your tab set = 1 (select 1 union 2) < / Code> 

    Database will generate an error

    Second, it is a better way of writing. I am basically updating three fields from TableB to tableA, but only if there are three different fields.

    I would not worry about performance if you really want to avoid updates, then you can write it like this:

      A SET x = bx, y = by, z = bz A from the table, table B, WHERE a.id = BID and (ax>   OR OR by & lt; & gt; BG)  

    WHERE with section updates prevents NULL


    Fluent NHibernate Automapper maps Enum to nvarchar(255) and not int? -


    Why arent maps as strings in the form of an automapper when using the automapper in NHibernate, and why not?

    <

    Thank you Mikael Henricson got the answer:

      public class EnumConvention: IPropertyConvention, IPropertyConventionAcceptance {# Region IPropertyConvention Member Apply Public Zero (IPProtest instance) {instance.CustomType (example.Property.PropertyType); } #endrian # Ariane IPProot Convention Approval Member Acceptance of Public Zero (IAcceptanceCriteria & lt; IP Inspector & gt; Criterion) {Criteria. Expect (X => X. Property Property Type. ISANUm); } #endregion}  

    javascript - Why should I use string.length == 0 over string == "" when checking for empty string in ECMAScript? -


    Most developers on my current project use the strange method (me) to check the empty strings in ECMAScript:

      If the string is empty  

    I will type it instead:

      If (theString = = "") // string is empty  

    The later versions seem more readable and natural to me.

    I asked someone to be able to explain the benefits of version 1. I think in the past few days somebody had told everyone that this is the way to do this, but now that person has left and nobody misses why he should do it like this.

    > I am thinking that what is the reason that I should choose the first version on the second edition? Is it a matter, is one version better than another? Is a version safe or fast for some reason?

    (We actually do this in the Siebel ESPT which correspond to ECMAScript version 4)

    Thank you.

    I really like that technology in many languages, because sometimes an empty string It is difficult to differentiate between "" and many other strings ( "" , '' ').

    But there is another reason to avoid theString == "" false == "" and 0.0 = as true = "" ...

    ... as long as you address such as the string < / Code> is actually a string , you can bother yourself by using a weak comparison. Fortunately, you can avoid the fair use of this exact equivalent ( === ) operator:

      if (theString === "") // string     

    javascript - Sending large of amounts of data cross domain -


    I want to create a mashup where large numbers of data need to be sent to a cross domain. I am thinking of using IFRAMES is my question ...

    Will this work ?? Does Google use it?

    Is there any concept or some kind of psuedo that tells how Google does?

    It is very important to know how to know about doing this. I'm using jquery so anyone know about any example in jquery, it would be nice.

    Google index iframes, but not as part of parent page So if you search on the iframe content, you will not get a hit on the parent page, but only on the url of iframe.

    If you can, better server-side usage is included, for example, JSP will send you the & lt; Jsp: include & gt; or & lt; C: import & gt; . ASP is a comparable thing. PHP contains () For this, frames are considered bad behavior as part of a website, they should make better use of non-HTML content such as PDFs.


    php - Linux-based MS Office thumbnail generation -


    Generates thumbnail images, and it uses a lot of PDF docprint utility to do MS Office +. Due to this one requirement, the system is running on Windows Server 2003+ IIS.

    I like the system running on the Linux server, instead of MS, because I have more experience in administering Linux systems than Windows and we do not have any other technical staff at home.

    Does anyone know a way to handle document conversion using native Linux software? I like some PHP native resident, but if I need to, I want to look outside.

    I have never done anything like this, so I just throw an idea over your head I am

    Did you think of using open office capabilities to create thumbnail images? I know oo saves thumbnail images within a built document, so what you need to do is remove it to display the picture. (It is.) You can always "hack" some kind of where you run a file through the open office and you can remove the image to display a small thumbnail.

    Again, I do not know how this would work right, but it could be worth a shot.


    user interface - What language are most mainstream Windows GUI programs written in? -


    I am curious to know how most Windows GUI programs have been written - for example, AOL Instant Messenger, Microsoft Word, Notepad, other popular shareware programs and more.

    Thank you!

    Older programs are usually written in Visual C ++, usually on structures like MFC at top. (Unless the program was written by Microsoft, which practically never used MFC. :)) Visual Basic was also very common for internal or amateur applications, but not for the famous "mainstream" ones.

    New programs are usually written on the .NET platform, so in C # or VB.NET.


    regex - How to validate digits (including floats) in javascript -


    वर्तमान में मैं इस reg exp का उपयोग कर रहा हूं:

      var मान्य = (value.match) (/ ^ \ d + $ /));  

    लेकिन '0.40' या '2.43' जैसे अंकों के लिए यह काम नहीं करता है।

    <पूर्व> var मान्य = (मैं) value.match (/ ^ - \ d * (\ \ d +) $ /?।?));

    .net - How do you extract an assembly full name from the assembly qualified name of a type? -


    मेरे पास एक प्रकार का एक विधानसभा का नाम है, जैसे

    MyNamespace.MyClass, MyAssembly , संस्करण = 1.0.0.0, संस्कृति = तटस्थ, सार्वजनिककीटोकन = शून्य

    मैं विधानसभा का पूर्ण नाम निकालना चाहता हूँ, अर्थात

    MyAssembly, Version = 1.0 .0.0, संस्कृति = तटस्थ, सार्वजनिककीटोकन = शून्य

    जाहिर है मैं यह साधारण स्ट्रिंग पार्सिंग के साथ कर सकता हूं, लेकिन क्या ऐसा करने के लिए एक ढांचा विधि है?

    नोट: मेरे पास प्रकार या असेंबली नहीं है, केवल स्ट्रिंग, और यह समस्या का एक अनिवार्य हिस्सा है, इसलिए myType.AssemblyQualifiedName, myType.Assembly.FullName, आदि नहीं जा रहा है

    ए एक समारोह स्वीकार करता है जिसका उपयोग विधानसभा को हल करने के लिए किया जा सकता है । रिसाव रद्द नल सामान्य रूप से एक अपवाद फेंकता होता है क्योंकि प्रकार का हल नहीं हो सकता, लेकिन इसे throwOnError पैरामीटर में झूठी झूठी झेलकर दबाया जा सकता है।

    हल करने के लिए उपयोग किए गए फ़ंक्शन बाहरी स्कोप में एक स्ट्रिंग चर सेट कर सकते हैं मूल कोड वापस आ जाएगा।

      सिस्टम का उपयोग कर; System.Diagnostics का उपयोग कर; सिस्टम का उपयोग कर। नामस्थान ConsoleApp {सार्वजनिक स्थिर वर्ग कार्यक्रम {सार्वजनिक स्थिर शून्य मुख्य () {var assemblyName = GetAssemblyName ("MyNamespace.MyClass, MyAssembly, संस्करण = 1.0.0.0, संस्कृति = तटस्थ, PublicKeyToken = null"); डीबग। एसेट (असेंबली नाम == "मायऐस्म्बैन्ड, संस्करण = 1.0.0.0, संस्कृति = तटस्थ, सार्वजनिककी टोकन = शून्य"); } सार्वजनिक स्थिर स्ट्रिंग GetAssemblyName (स्ट्रिंग प्रकारनाम) {स्ट्रिंग विधानसभा नाम = शून्य; फ़ंक्शन & lt; विधानसभा नाम, विधानसभा & gt; विधानसभा = समाधान = नाम = & gt; {AssemblyName = name.FullName; वापसी नल; }; Var प्रकार = प्रकार। गेटटाइप (प्रकारनाम, असेंबलीरॉल्वर, रिक्त, गलत); अगर (प्रकार! = नल) वापसी प्रकार। विधानसभागुणित नाम; वापसी विधानसभा नाम; }}}  
    पर क्लिक करें

    apache2 - Run Zend Framework with Apache 2.2 -


    I have a project written with the Zend Framework. I was using xampp for my webserver, which uses Apache 2.2 I decided to use Apache 2.2 instead of XMPP. I installed Apache 2.2 and copied my project to the aptech's HTOX folder as I did with XMP. But when I enter my project URL in the browser, it does not show my index.php and instead, it shows the contents of my file any ideas to fix it !? You will need to install PHP and enable PHP module for Apache. Here are the instructions:

    and

    Although I personally want to use WAMPserver - install it Very simple:


    python - Pythonic List Comprehension -


    It seems like a normal task, changes some elements of the array, but my solution is not very dragon experience Does Is there a better way with an understanding of urls list?

      links = re.findall (r ("?: Https ?: // | www ..https: // www.) [\ S] +", text) if LAN ( Link) == 0: Links to link URL = [] link: If the link [0: 4] == "www.": Link = "http: //" + link urls.append (link)  

    Maybe something like that

      links = re.findall (r "(?: Https ?: // | www \. Html?): // www. ) [\ S] + text, if the link == 0: return text url = map (lambda x: some (x), links)  

      ["http: //" + link if linked [0: 4] == 'www.' Links to links in other links]  

    or

      [link [0: 4] == 'www.' And "http: //" + link or link]  

    for links in the link: ("http: //" link if link [0: 4] ]] == 'www.' And link) - Is it like a tirey operator? In C

    (link [0: 4] == 'www.' And 'http: //' + link or link ") - it has the same meaning.


    On the second subject: I do a test for http: //, not for www. For example, the domain does not have to start with www.


    winforms - Refresh / Update WPF controls like win forms -


    एक लेबल का टेक्स्ट बदलना (या परिष्कृत रूप से हम एक टेक्स्ट-आधारित प्रगति बार कह सकते हैं)। Winforms में आप सिर्फ अमान्य / अद्यतन करें

    लेकिन पृष्ठभूमि थ्रेड्स का उपयोग किए बिना यह कैसे करें WPF में। ???

    <पूर्व> सार्वजनिक स्थैतिक वर्ग एक्सटेंशन-विधि {निजी स्थिर कार्रवाई EmptyDelegate = delegate () {}; सार्वजनिक स्थैतिक शून्य ताज़ा करें (यह UIElement uiElement) {uiElement.Dispatcher.Invoke (DispatcherPriority.Render, EmptyDelegate); }} निजी शून्य लूपिंग विधि () (के लिए (इंट i = 0; i & lt; 10; i ++) {label1.Content = i.ToString (); label1.Refresh (); Thread.Sleep (500); }}

    संदर्भ:


    cocos2d iphone - A problem when using PageTransitionForward and Backward -


    मेरे वीडियो के अनुसार

    जब कॉल एनीमेशन पेज ट्रांन्सिशन अग्रेषित हो तो इसके पास त्रिकोण को बाईं तरफ और उस त्रिकोण को अगले स्तर के माध्यम से देख सकते हैं

    मैं इसे कैसे ठीक कर सकता हूं?

    यह गहराई बफर की सीमा के कारण होता है (अधिक जानकारी के लिए z- लड़ाई के बारे में खोज करें)।

    इसे ठीक करने के लिए बस CCPageTurn3DAction.m फ़ाइल को खोजने के लिए और (शून्य) अपडेट: (ccTime) विधि एनिमेटेड ग्रिड के सभी ऊर्ध्वाधरों के कुछ उच्च मूल्य (जैसे 0.5) में z समन्वय बदलें।


    Importing Excel data to a already established SQL DB visual basic -


    I have developed a program in which all data is entered in SQL DB. The program is designed in Visual Studio using Visual Basic. Now I am providing external data in an Excel format and need to import Excel data in SQL DB and ensure that the data goes into the appropriate column is. I have prepared a template for them with standard excel headers and I look at the data in a datagrid visit before importing, but the last part which is an import function for SQL I have not worked yet.

    Any help would be most appreciative

    Do you have a specific problem?

    Using SSIS to import a better bet data can be done to do SSIS.


    import - How to refer to the local module in Python? -


    मान लें कि हमारे पास एक मॉड्यूल है m :

      var = कोई डीईएफ़ get_var (): वापसी var def set_var (v): var = v  

    यह अपेक्षा के अनुरूप काम नहीं करेगा, क्योंकि set_var () संग्रह नहीं करेगा मॉड्यूल-व्यापी var में v । इसके बजाय एक स्थानीय वैरिएबल var बनायेगा।

    तो मुझे m से set_var () , जो खुद मॉड्यूल का एक सदस्य है m मुझे यह कैसे करना चाहिए?

    जैसा दिखता है, आपको वास्तव में स्थानीय मॉड्यूल के संदर्भ की ज़रूरत नहीं है ओपी के उद्देश्य को प्राप्त करने के लिए वैश्विक कीवर्ड इस लक्ष्य को प्राप्त कर सकता है।

    हालांकि ओपी शीर्षक का उत्तर देने के लिए, कैसे पायथन में स्थानीय मॉड्यूल का संदर्भ लें? :

      import sys var = कोई def set_var (v): sys.modules [__ नाम __]। Var = v def get_var (): return var  

    java - Checking serial code correctness -


    I have a method in Java that creates a serial code based on several parameters.

    Now I have another method that accepts the same parameter + serial code, and tells me whether the serial code is correct or not. However, I do not want to expose the serial code creation method, so if a person knows the method to check the accuracy, then it should not be made a new code based on any other parameter.

    Is this possible?

    Some additional important information I can not change is the method that generates the serial code. Otherwise I can use some standard public-private key algorithms. What do I need:

    What I really want is the problem that I can not select my private key, this is a method I can not change.

    methodICannotChange ("someinput") Returns the serialcode method. Isin input (serialcode, "some input") returns true or false

    and in the witch It is 'impossible' to generate a new serialcode, when implementing the method. [/ P]

    What you're doing is basically making custom. The hash function allows to answer only if the answer given in given digest matches is input data. To wit. Anybody is able to create a digest for the data.

    What exactly do you really mean? The general idea is to do the following:

    1. Make a personal and public key;
    2. Uncover any public key to the public;
    3. Any data should be distributed to the customer to sign the data and with it's private key;
    4. Encrypted an encrypted message with its public key, decrypts the message digest for the given data, and the calculated investigation is of the same type distributed;

    Let the client be sure that the pipe received from the server is correct if it is able to decrypt it using your public key.


    Using JavaScript to "animate" my webpage -


    I thought I would write a simple script to animate my webpage a little bit.

    The original idea was big for a div to break, when I pressed a button once and minimized its original size, when I push it again I handle the moving part well , But I can not do it again to shrink.

    I am including a complete example, can you help me fix it?

      & lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD XHTML 1.0 Stronger // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Title & gt; Test & lt; / Title & gt; & Lt; Meta http-equiv = "content-language" content = "Estonian" /> & Lt; Meta http-equiv = "content-type" content = "text / html; charset = ISO-8859-15" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script type = "text / javascript" & gt; Var i; Var is increasing = new boolean ("true"); Var height; Function testFunction () {height = parseInt (document.getElementById ("testDiv") offset heit); If (increasing == true) {i = height + 4; Document.getElementById ("testDiv"). Style.height = i + "px"; If (height> = 304) {increase = false; } And {break (30); }} And {i = height - 4; Document.getElementById ("testDiv"). Style.height = i + "px"; If (height  

    Use a standard jQuery library to do this, Do not do it in to make sure will not be a cross-browser.

    With jQuery, you can work like this:

      $ ("# div-id"). Chetan ({"height": 300}, 1000);  

    This will change the div height to 300 px in 1000 ms = 1 second.


    css - Equal height colums by 960.gs framework -


    Is there a CSS / layout method on which we can create even higher columns through 960.gs

    I'm currently using

    You can try to use the CSS display type, which can be the move based on your design, but if you do not need the same limitations or background.

    And you can & lt; Table & gt; . I know how this is politically incorrect, but tables work and hack is not there. To compile with you gs.960

    , enter & lt; for cell location and padding. Td> Style type may need to be adjusted>

    .net - How do I load different images, PNG, GIF and JPG in the background using WPF? -


    मैं Image को Background में लोड करने के लिए WPF का उपयोग कर रहा हूँ

    समस्या यह है कि URL स्ट्रिंग PNG, GIF या JPG हो सकती है और मुझे या तो JpegBitmapDecoder , PngBitmapDecoder या का उपयोग करने की आवश्यकता है I GifBitmapDecoder । अगर सही डिकोडर का उपयोग नहीं किया जाता है तो FileFormatException होता है।

    मैं स्ट्रिंग पर विस्तार का उपयोग कर सकता हूं, लेकिन उपयोगकर्ता के पास एक। विस्तार।

    कोई भी विचार कैसे मैं इस समस्या को हल करता?

    आप बाइनरी हो सकता है फ़ाइल के आरंभिक भाग को खुद पढ़ो और इसकी तुलना में विभिन्न फ़ाइल विनिर्देशों की तुलना करें।

    मुझे सिर्फ कुछ जेपीजी फ़ाइलों को चश्मा को पढ़ने के बिना जांचने से मिला, और यह केवल एक बहुत ही सामान्य मैच पैटर्न है, इसलिए यह विश्वसनीय नहीं है, बल्कि एक उदाहरण के रूप में (वास्तविक ऐप्स में आपको नहीं चाहिए कोर्स की संपूर्ण धारा पढ़ें):

      दो दोहराएं (यूआरएल: स्ट्रिंग) = रेक = वेबर्यूएस्ट। बनाएं (यूआरएल) आरएसपी = रेक। गेट रेस्पॉन्स () का उपयोग करें स्ट्रीम = आरएसपी.गेटआरपीएसपॉइंटस्ट्रीम ( ) रीडर का उपयोग करें = नया स्ट्रीमरिडर (स्ट्रीम) GetResult = reader.ReadToEnd () GetResult.Contains ("JFIF") करें  

    तो पहले 2 सही पैदा होगा, और तीसरा गलत: < / P> <पूर्व> इस्जपीज "http://www.flatpackrevolution.com/wp-content/uploads/2007/10/pow.jpg" इज़जपीजी "http://bedzine.com/blog/wp-content /uploads/2008/04/4-17-स्टाक- ड्रायर्स -1-1.jpg "इस्जैpg" http://sstatic.net/so/img/logo.png "


    Setting source port on a Java Socket? -


    I am very new to socket programming:

    Is it possible to explicitly set source port Is on the java socket?

    I am working on a client / server application in which the client can probably listen for answers from the server on multiple ports. It would be good if I set this reply port on the client side when starting the socket, so that the server should be able to determine which port to answer on the other side.

    Yes, use the method. It mirrors the function available in the highest-level socket implementation. Note that you can not independently choose which port to use on a port, some categories are considered reserved and off-cement for user applications.


    c# - Can http context get lost with async await? -


    Our application crashes from time to time due to this error: i do not want to decode this error myself, But there are some questions about this one possible reason:

    I see the code in system.web with ILSP and I have come to the conception that the http loses the runtime context (and an unmanaged Indicator) and therefore crash I have no details about the exception, so I All the codes are examined and everything is very straightforward except for an API call.

    This looks like (or pseudo-code):

      private async Task SearchSync () {Fx < Stream, http content, transportcontext, task & gt; Search = async (stream, content, transportContext) = & gt; {StreamWriter Writer = New Streamer (Stream); & Lt; Data & gt; Write = new action & lt; Data & gt; () {Author. Author; Data ;; Writer.WriteLine (); Writer.flush (); }; & Lt; Tasks & gt; Task = new list & amp ;; Tasks & gt; (); (Task) service (service in service) {taskss.Add (task.ron ((=) → service.Calla SINC ());} Wait for the Task When someone (Task Daley (10000), Task .jain (all);}; Response.Content = new PushStreamContent (search, "text / event-stream");}  

    It seems a bit weird but the reason for this is: / P>

    • We need to trigger some services, half of them do not have any async client libraries. We have some process before and after the service call Also, like making a DB call (not ASCNC, thanks to the Mongo driver) and making CPU-intensive calculations.
    • It may take a very long time to answer each service (like 1 minute ). So, as soon as possible, try pushing the content into the same reaction stream.
    • We do not want to wait for the user for such a long time, so we request the user Cancel, but the search will continue, so the data is available the next time.

    So the question is: What can be lost http context of some kind of code? In the following by means of lost: In the linked question you see that an original methode system fails inside. Web. Probably because this method has passed IntPtr (Coming from http reference) is no longer valid

    Are there any potential problems I do not see? How to deal with parallel works in IIS?


    Edit: Why is the service. CallAsync Async?

    The code simplifies the real situation. In my code the service is a cover around a real service. Each service has several stages, many classes and many levels of mediators, but the structure is like this:

      GetFromDatabase (); // is not asaccessive yet, because the Mongo driver awaits CallServiceAsync (); // Sometimes async, sometimes not, depending on the service. PrepareResults (); // async no, but CPU intensive  

    So in my view, it makes sense, to parse it to reduce the reaction time.

    HttpContext is stored on synchronization conttsbox. Withdrawing Threadball Thread With Work You are not using SC and so you do not have access to HTTPNTTEX.

    If callax is an async method that you do not really need to use the task. Run here and you can store the work instead of:

      tasks.Add (service.CallAsync);  

    If you still need work, run you can pass HTTP to Manually :

      var reference = HttpContext.Current; tasks.Add (task.run ((=) {HttpContext.Current = reference; service.CallAsync (write)})  

    java - Can I somehow work around this particular aspect of ResourceIterator's laziness? -


    जब दो समवर्ती लेनदेन t1 और t2 (I ' बोयलरप्लेट को छोड़ दें, बस मान लें कि मैं किताब से सब कुछ कर रहा हूं):

    थ्रेड A: t1 :

      it1 = db findNodes (लेबल); थ्रेड बी:  टी 2 : 

        It2 = db.findNodes (लेबल); it2.forEach (नोड - & gt; नोड। RemoveLabel (लेबल))  

    अब, मेरे दृष्टिकोण से, हमारे पास एक विशाल यहां असंगतता: यदि धागा एक धागा बी की तुलना में धीमी क्रियान्वित करता है, तो बिंदु पर हम जांचते हैं कि ए में नोड में लेबल label है, तो परिणाम होगा false !

    एक डेवलपर के रूप में, मैं समझता हूं कि चूंकि हेटरेटर आलसी हैं, यह एक प्रकार का पूर्वानुमान है और मुझे इस व्यवहार के पीछे कारण देखते हैं, लेकिन एक एपीआई उपयोगकर्ता के तौर पर, मैं वास्तव में इस तथ्य से नाराज था कि मैं <100> यह सुनिश्चित करने में 100% निश्चित नहीं है कि जिन नोड्स को मैंने लेबल वाले के रूप में अनुरोध किया था, वे इसे नहीं करने के लिए बाहर निकलें!

    ऐसी स्थिति हो, जहां किसी भी इकाई पर एक लिखना लॉक प्राप्त करना संभव नहीं है जो समवर्ती संशोधन से उन सभी नोडों की रक्षा करेगा, इसलिए मुझे कुछ अच्छे टूल के साथ भी स्थिरता नहीं मिल सकती है।

    मैं वास्तव में यह मत सोचो कि यह एक बग है - बल्कि एक सुविधा जंगली गई है। हालांकि, मुझे यह पता चलने में खुशी होगी कि कोई समस्या है जो मुझे मेरी समस्या से मदद करेगी।

    अपडेट: यहां बताया गया है कि यह छद्म-दौड़ की स्थिति कैसे होती है:

      इससे पहले: इसके साथ 100 नोड बनाएं: लेबल ए: इसके साथ सभी नोड्स के लिए इटेरेटर प्राप्त करें: लेबल बी: सभी नोड्स के लिए इटरेटर प्राप्त करें: लेबल ए: उदाहरण का उपभोग 50 नोड्स बी: सभी नोड्स से लेबल्स को हटा दें, ए: एडी के बाकी नोड्स को देखिए: Label  

    आपको एक कठिन प्रश्न मिल गया है - चूंकि किसी ने एक जवाब का प्रयास नहीं किया है, मैं एक कोशिश करूँगा।

    मुझे लगता है कि उत्तर का ब्योरा कैसे लेनदेन के साथ neo4j सौदों मेरे लिए बहुत ही प्रासंगिक लगता है, जो कहते हैं:

    Neo4j में लेन-देन पठन-प्रतिबद्ध अलगाव स्तर का उपयोग करते हैं, जिसका अर्थ है कि जैसे ही यह प्रतिबद्ध हो गया है और डेटा अन्य में नहीं दिखाई देगा लेनदेन जो अभी तक प्रतिबद्ध नहीं हैं। इस प्रकार का अलगाव धारावाहिककरण से कमजोर है, लेकिन बहुत अधिक मामलों के लिए पर्याप्त होने पर महत्वपूर्ण प्रदर्शन लाभ प्रदान करता है।

    मुझे लगता है कि आप लेनदेन के भीतर उन लेबलों को हटा रहे हैं मेरी पढ़ा है कि थ्रेड ए में एक भी लेबल नहीं बदल सकता है, जब तक सभी थ्रेड बी समाप्त नहीं हो जाते। इसका कारण यह है कि आप कई नोड्स से लेबल्स को हटा सकते हैं, लेकिन उसमें से किसी भी रिलेक्शन ट्रांज़ैक्शन कमाने तक किसी अन्य थ्रेड तक वास्तविक / दृश्यमान नहीं है। कम से कम यह ऐसा कैसे होना चाहिए।

    इसलिए आपकी दौड़ की स्थिति यहाँ होती है, जब थ्रेड ए प्रारंभ होता है <जब थ्रेड बी निष्पादित होता है, लेकिन इससे पहले थ्रेड बी

    मुझे लगता है कि आपका सबसे अच्छा जवाब शायद उस लिंक के दूसरे पैराग्राफ से आता है:

    इसके अतिरिक्त, Neo4j Java API (उन्नत उपयोग देखें) स्पष्ट लॉकिंग को सक्षम करता है नोड्स और रिश्तों लॉक का उपयोग करने के लिए स्पष्ट रूप से ताले प्राप्त करने और रिलीज़ करने के द्वारा अलगाव के उच्च स्तर के प्रभावों का अनुकरण करने का अवसर मिलता है। उदाहरण के लिए, यदि कोई लिखित लॉक सामान्य नोड या रिश्ते पर लिया जाता है, तो सभी लेनदेन उस लॉक पर सीरियल करेगा - एक क्रमबद्धता अलगाव स्तर के प्रभाव को दे।

    अंदर की थ्रेड बी, आप उन नोड्स के लिए चाहते हैं जिन्हें आप संशोधित कर रहे हैं। यह लेन-देन तब जारी किया जाएगा, जब लेन-देन करना होगा।

    मैं इस जवाब की 100% निश्चित नहीं हूं, लेकिन मुझे लगता है कि यह समझ में आता है। अगर कोई और अनुभवी व्यक्ति इस पर सुधार कर सकता है या विरोध कर सकता है, तो कृपया अंदर जायें।


    r - geom_density doesn't fill correctly with scale_y_log10 -


    कोड:

      की आवश्यकता है (ggplot2) set.seed (0) xvar & lt; - (100) ggplot (डेटा.फ्रेम (xvar), एईएस (xvar)) + जीओएम_डेंसी (भरण = "लाइटब्लू") + scale_y_log10 ()  

    ग्राफ़ कुछ ऐसा है: < Img src = "https://i.stack.imgur.com/9E4f3.png" alt = "badgraph">

    मैं कैसे दाएं किनारे पर ग्राफ शेड कर सकता हूँ (जैसे नीचे) घनत्व का अनुमान?

    समस्या यह है कि डिफ़ॉल्ट रूप से stat_density के बीच भरता है घनत्व और रूपांतरित किए गए डेटा के y = 0 लाइन तो परिवर्तनों को जो y = 0 लाइन को बदलते हैं, इस प्रकार की समस्याओं के शिकार शिकार गिर जाएगी। मैं व्यक्तिगत तौर पर लगता है कि यह ggplot2 में एक बग है, हालांकि जब से ग्राफिकल व्याकरण के विशेषज्ञ शायद तर्क देते हैं कि y- परिवर्तित घनत्व अर्थहीन हैं, बग को बहुत अधिक ध्यान नहीं मिल सकता है।

    A बहुत ही क्लीजी वर्कअराउंड मैन्युअल रूप से .. घनत्व .. पर ऑफसेट जोड़ना है, जिसे आपको स्पष्ट रूप से आह्वान करना होगा, और फिर इसे बनाने के लिए ब्रेक को बदलना होगा जैसे आप कुछ अजीब नहीं करते। / P>

      की आवश्यकता होती है (ggplot2) की आवश्यकता है (तराजू) set.seed (0) xvar & lt; - rnorm (100000) क्वार्ट्ज (ऊंचाई = 4, चौड़ाई = 6) ggplot (data.frame (xvar) एईएस (x = xvar, y = log10 (.. घनत्व ..) + 4)) + जीओएम_डेंसिटी (भरें = 'लाइटब्लू') + स्केल_आई_कंटिएंस (ब्रेक्स = सी (0,1,2,3,4), लेबल = सी ('0.0001', '0.001', '0.01', '0.1', '1'), सीमा = सी (0,4), नाम = 'घनत्व') quartz.save ('! [StackOverflow_29111741_v2] [1] पीजीएन ')  

    यह कोड इस ग्राफ का उत्पादन करता है: Kludged graph


    How to Set a Range Based on a User Selected cell reference in Excel VBA -


    I am currently running a code where the user selects a cell reference (which is the column title name) and the code The dataset from that selection creates the current code by running the search command on the selected heading string. It has worked really well, but it is problematic if the title appears twice in the same row. What I want to do instead, changes the search row with the offset from the selected row, but I'm having trouble.

    The original code was using the search code:

      sub-testing () dimmed as serial 1 as the string dim AR2 in the form of variant dim strows In the form of a variable late path in the form of string thumen Z. string path = ActiveWorkbook.Path ar1 = worksheet ("Sheet 1") as long as' counter dim output. Category ("C6: C222") Vala str1 = Application.InputBox ("Select data title from row 6", _ "get string", type: = 2) ar2 = category (range ("E6: IP6"). Find (str1), range ( "E6: IP6"). (Str1). End (xlDown)) for Ubound (ar1, 1) = 1 for J = 1 Output & amp; R1 (J, 1) & amp; "," & Amp; AR2 (J, 1) & amp; VbNewLine Next Open Path & amp; # 1 "# text_data.txt" output for print # 1 as output finished Close  

    My new code is as follows: However, I receive a run time error ' 1004 - Application Defined or Object-Defined Error When the code goes to the line, where I set the ar2 array

      ar2 = Range (rng1.offset (0, 0), rng1.offset (216, 0)) subtest ( ) String path as string dim jade in the form of Variable Deam Path as Variable slow RNG 1 range Dim AR2 as Dim ARAI = ActiveWorkBook.Path ar1 = Worksheets ("Sheet 1") as long as 'Counter dim output. Range ("value set rng1 = Application.InputBox (" select the title of data from line 6 ", _" get string ", type: = 8) ar2 = category (rng1.offset (0, 0), rng1. Ubound (AR1, 1) Output = amp; R1 (J, 1) & amp; "," & Amp; AR2 (J, 1) for Offset (216, 0)) Jammu = 1; ; VbNewLine Next open path & output # 1 as print # 1, "stop output"  

    Any help is appreciated

    My solution of the problem sticks below After all, what I did was to change the size of the range that the user has chosen in the input box command and offset by the number of expected rows, which starts at the bottom of the data. Because my data is always below a certain fixed length under the selected heading.

    The reference to the offsetting range came from

      sub-testing (), such asString Path = ActiveWorkbook.Path ar1 = Worksheet ("Find Friends") as Long Dim Output as String Dim Z as the Range Dim Path in the form of Variant Slow RNG as Arrayus Ar1. Range ("C6: C222") set value rng1 = Application.InputBox ("Choose the title of data from row 5", _ "select indicator", type: = 8) ar2 = rng1.Offset (1, 0). Ubound (AR1, 1) for resize (rng1.Rows.Count + 215, rng1.Column.Count) Jammu = 1 Output = Output & amp; R1 (J, 1) & amp; "," & Amp; AR2 (J, 1) & amp; VbNewLine Next Open Path & amp; Output to output # 1 as impression # 1, "Turn off Android"  

    python - 400*1 cells in original data, 64*64 matrix in each cell, how to stretch the data into column vectors and form a 4096*400 matrix? -


    I'm new to Python and now I have a problem in my assignment. There is a basic dataset in this dataset, 400 cells. In each cell, there are 64 * 64 matrix.

      array ([[array ([, 75, 89, 101, ..., 90, 80, 74], [83, 98, 106, ..., 90, 82, 76], [83, 101, 109, ..., 92, 82, 72] ..., [52, 50, 54, ..., 37, 40, 42], [49, 51, 51,. .., 36, 39, 40], [49, 50, 49, ..., 37, 39, 38]], dtype = uint8), array ([[110, 114, 124, ..., 46, 45, 45], [108, 117, 126, ..., 52, 51, 51], [120, 125, 129, ..., 49, 50, 50], ..., [187, 18] 9, 192, ..., 35, 35, 35], [187, 188, 1 9 1, ..., 33, 33, 33], [185, 1 9, 18, 9 ... , [37, 37, 37]], dtype = uint8, array ([[77, 97, 119, ..., 97, 86, 75], [75, 96, 116, ..., 98, 91, 73], [65, 84, 110, ..., 96, 90, 75] ..., [32, 24, 20, ..., 33, 36, 37], [28, 23, 19, ..., 35, 35, 38], [27, 22, 19, ..., 34, 36, 37]], dtype = uint8),  

    (among them 400) I want to spread the data into column vectors and make a matrix In the new matrix, a cell of the original data in each column vector contains 64 * 64 = 4096 data and thus I could get a 4096 * 400 matrix.

    Thank you ...

    Your question will need to resize your array and then transfer it to:

    In
      [28]: a = np.arange (3 * 4 * 2). Renewal (3,1, [49]: One out [29]: Array ([[[0, 1], [2, 3], [4, 5], [6, 7]], [ [[8, 9], [10, 11], [12, 13], [14, 15]], [[16, 17], [18, 19], [20, 21], [22, 23 ]]] In [30]: a.reshape (a.shape [0], a.shape [-2] * a.shape [-1] t out [30]: array ([[0, 8, [6, 14, 22] [4, 12, 20], [5, 13, 21], [1, 9, 17], [2, 10, 18], [3, 11, 19] [6, 14, 22]], [7, 15, 23]] As David said in the comments, if you want to anoint 64x64 matrix column-wise, then  Fortran  in the  reshape : 

      in [31]: a.reshape ((a.shape [0], a.shape [-2] * A TT [31]: Array ([[0, 8, 16], [2, 10, 18], [4, 12, 20], [6, 14, 22], [1, 9, 17] , [3, 11, 19], [5, 13, 21], [7, 15, 23]])   

    However, how do you get your data to be printed with the array in that form ([[array ([[[ is unusual and there is nothing that I immediately How to you did. You might want to consider changing the way to generate that dataset: If the number of 64x64 "matrix" is pre-known, you can create an array ( np .rempty (400, 64, 64) ) and then fill it Otherwise, a normal Python The list will be enough, for which you can add each new 64x64 matrix and finally change the list of arrays in a full array ( np.array (list_of_matrices) ).


    c++ - Obtaining last node of BST from an iterator returned by end() function? -


    I am struggling to understand the implementation requirements of the last () function, which triggers an error from the last element Pointing at What is the meaning of the last element? Will not it always be empty? And if there is no information in it, how can I get the last node of BST with the help of O (1) end, with the complexity of time?

    The concept of a "blank" element is something that is not just in the iterator. It's really meaningless. Iterators are not raw Si pointers.

    This is to design your iterators that gives the end node on end () - 1 on such a non-empty container, if iterator is to start with.

    For the more common case of forward iterator, what you actually want is that some iterator is equal to < />

    This is sometimes done due to being end (), indicates a special node The functionality of end () exists for convenience.

    An Iterator can show a Boolean region which is the result of end () , for example. Iterator can keep as much information as you want, it is an adaptation to reduce that amount, but an alternate one.

    is not the only available means of getting any operator for the start () and end () .

    >

    jquery - Append query string to iframe source -


    I have a page with several illustrations that are added by the end user through CMS. At the end of the iframe source I need to add a query string (exactly the same as all iframes) and stuck on how to proceed.

    My current code is here where Frame-wrapped container is almost all iframes:

      $ (document) .ready (function () {var hideLinkHeader = 'hideLink = true & hideHeader = true' var var = url do not know How to set it each iframe $ ('.frame-wrap'). ('Iframe') .tr ('src', url + hideLinkHeader);});  

    Any help is greatly appreciated.

    This should work, I understand my problem properly

     < Code> $ (document) .ready (function () {var hideLinkHeader = 'hideLink = true & hideHeader = true'; // fram-wrap $ .eich ($ ('frame-wrap'). ('Iframe'), Function (index, i) {// set url var url = $ (i) .attr ('Src'); // set for the source of iframe of this intestation. Set the source of the iframe of this intersection to equal url Links header global variable $ (i) .attr ('src', url + hideLinkHeader);});});  

    Working JSFDial:


    Cannot connect to a hosted SQL Server -


    I am getting an error

    A network-related or instance-specific error occurred While the installation server for a SQL Server server was not found or was not accessible. Verify that the example name is correct and SQL Server is configured to allow remote connection. (Provider: SQL Network Interfaces, Error: 50 - Local database runtime error occurred. See the Windows Application event log for error details.

    This is my connection string Is:

      & lt; add name = "test_DatabaseEntities" connectionstring = "metadata = race: //*/mymodel.csdl | race: //*/mymodel.ssdl | race: // * / Mymodel .msl; Provider = System.Data.SqlClient; Provider Connection String = 'Server = Local Host; Database = decontac_test; uid = decontac_decontac; Pa Word = **********; MultipleActiveResultSets = True; Application = EntityFramework '"ProviderName =" System.Data.EntityClient "/>  

    This email I hosted Company has found:

    To use connection string: <

    Please be my first time to host a site and this error is crazy to me When I use Credential I am able to see the database in SQL Server 2.


    php - SQL Database Design - User Profile -


    I want some advice / help how to effectively design a user profile database.

    I have a user table that holds, ID, username, email, password I want to create a priority table which will keep all other user profile information. My question is that I like this How do I create a database,

    In user preferences, I have a column car . I want to be able to collaborate with many users with the same user and many users with the same car, I also agree that I need many for many relationships. Can I get some help about this?

    In addition, what does the recovery query look like? I.e. select car name from the car where the owner = current user will give me all this car that is connected to the user?

    You need it:

    and to use the solution by user58273

      the car, User, select car_name from users_car where car.id = users_car.car_id and users.id = users_car.user_id and user .id = 'current_user';  

    python - Updating a dataframe column in spark -


    Given the new Spark Data Frame API, it is not clear whether it is possible to modify the dataframe column.

    How do I go about changing a value in the line in the x column y ?

    A new data frame with the desired modifications.

    If you want to change the value in a column based on a condition, such as np.where :

      from pyspark.sql import as the function F update_func = (F.when (F.col ( 'update_col') == replace_val, new_value) or (F.col ( 'update_col'))) df = df.with column ( 'New_column_name', update_func )  

    If you want to do some work on a column and create a new column that is added to the dataframe:

      Important T-Pyspark. F. Import pyspark.sql.types as sql.f as T DEF my_func G) Return on material for columns transformed_value # if we believe that my_func a string my_udf = F.UserDefinedFunction (my_func, T.StringType ()) Df = df.with column ( 'new_column_name', my_udf ( 'update_col '))  

    If you want the new column to have the same name as the old column, then you have additional steps:

      df = df.drop (' Update_col '). With Colmrenamit ( 'new_column_name', 'update_col')  

    When you have a column You can work on a column and return a new dataframe reflecting that change. For this you can implement the operation to implement a UserDefinedFunction first and then select that function selectively for the selected column. Python:

    userdefinedFunction import pyspark.sql.functions to StringType name pyspark.sql.types = 'target_column' udf = UserDefinedFunction (lambda x: 'new_value', StringType ()) new_df = Old_df.select (* [ udf (column) .alias (name) if the column == name and column to column old_df.column])

    new_df now old_df is the same schema (as that assuming old_df.target_column also StringType anyway) but the column all values ​​target_column Will be new_value .


    php - CakePHP 2.4.1 $this->webroot gives / and not /app/webroot -


    I found the CakePHP 2.4.1 project and I do not want to use all HTML, CSS, script assistants because we never Also Cape Depends on PHP because we wanted to change the framework anytime, but when I try to load scripts, styles, images

      & lt; Php echo $ this- & gt; Webroot; ? & Gt; Css / app.min.css  

    but it generates a URL

      http://example.com/app.min.css  

    $ this-> WebRost just returns /, I'm not very familiar with cake php yet Is there a configuration setting or something that is changing? My VoHost file is a hint at WebRot.

    "webtr" directory which is accessible to the public. It contains all your asset elements, should look like this:

      - webroot | - Property | - CSS | - js | - IMG | - index.php // etc  

    So when you run $ this-> webroot , you accept the path to your public directory That all the property files will remain in this directory.

    In this event it has been modified, just open index.php of your app and find this line:

      define ' WEBROOT_DIR ',' MY_WEBROOT_DIR '); Change  

    and MY_WEBROOT_DIR to the actual name of your public directory because it remains in your CakePH application

    < / Div>

    javascript - Add dynamic validation text to custom jQuery validation rule -


    I have written a jQuery validation rule which displays the failure certification if the amount entered in input is 5000 or less 500000 more than. I am trying to set a verification message to a variable to be dynamic in the rule, but I am having a problem saying that I have not defined my approval message.

      # Error unwanted references: The error is not valid # Custom rules $ Validator.addMethod ("requestAmount", function (value, element) {var cleanAmount = value.replace (/ \, / g, ''); var validation message = ''; console.log (clean expression) (clean AMT ;5000) {var validation message = 'Enter more than $ 5,000.00 amount; return return;} and if (clean deposit> 500000) {var validationMessage =' Please enter less than amount amount $ 500,000.00 '; return false;} Other {return true;};}, verification message);    

    Announce and remove var validationMessage outside the function scope var each time you set the value to verification message :

      var validationMessage; # Custom rules $ Validator.addMethod ("requestAmount", function (value, element) {var cleanAmount = value.replace (/ \, / g, ''); validation message = ''; console.log (cleanAmount) if (clean amount & amp; ;5000) {Validation message = Enter amount greater than $ 5,000.00; Return return;} And if (clean amount> 500000) {Validation message = 'Enter less than $ 500,000.00'; Return return;} and return True;};}}, function () {return verification message;});  

    data structures - What is a binary interpolation search? -


    I understand what is, as well as

    I have to answer a question which tells me to tell that there is an binary interpolation search (BIS) , all in one sentence. Is it not two different types of searches, binary and interpolation? I have searched a lot and I have not been able to find such a way. What am I missing?

    I'm not sure what binary interpolation actually does, however, sorting insert binary launch type E, G, one element is given, is included in a sorted array and keeps its type together if we compare it to the elasticity of this, then the complexity of time O (n) will be, now it has been sorted, this par In situations, binary search can be implemented, with time complexity (Logan), as we all know.


    c++ - passing char by pointer and getting a different result -


    I'm using gethostname to get the name of the computer I'm working on. In my main work, I call it and UBU 24-PS-23 gets the correct name of my computer. Then I call a function and use this meetHost name and I get a different string. My main function gives gethostname 0, so it works, in my work it gives 1 so it fails. Any ideas why? Here is my code

      #include & lt; Iostream & gt; # Include & lt; Sys / unistd.h & gt; using namespace std; Int funToGetHostName (four * name, size_t lane); Int main () {Charged hostname [128]; Four hostname ceremonies [128]; Int g = gethostname (hostname, sizeof hostname); Int r = funToGetHostName (hostname function, sizeof hostnameFunction); Cout & lt; & Lt; "My hostname:% s \ n" & lt; & Lt; For host name & lt; & Lt; "" & Lt; & Lt; G & lt; & Lt; Endl; Cout & lt; & Lt; "My hostname function:% s \ n" & lt; & Lt; HostnameFunction & lt; & Lt; "" & Lt; & Lt; R; Return 0; } Int funToGetHostName (char * name, size_t len) {return gethostname (name, sizeof len); }  

      int funToGetHostName (char * name, size_t len) {return gethostname } (Name, size lanen);   

    The length of the size is expected to be smaller than expected.

    Instead, you want:

      returns guesthostname (name, lane);  

    Because you are already in buffer length when calling your function.