Posts

Showing posts from May, 2011

javascript - Image upload, resizing and encoding to base64 crashes Chrome on mobile -

My users can select an image using the file-upload HTML input element - 1. From there I downscale 2 I convert to base 64 Chrome Mobile & amp; The Android browser displays a crash - and 'out of memory error'. If the browser runs on a more 'modern / enabled' device then it is perfectly fine. Here is the reason for the error - can this be corrected? Here is an action that gives down aspect ratio (keeping aspect ratio) and image base 64 string Resize the function and convert 64 (IMG, MaxWide, MaxHit) {var imgWidth = img.width, imgHeight = img.height; Var ratio = 1, ratio 1 = 1, ratio 2 = 1; Ratio 1 = MaxWide / IMG depth; Ratio 2 = max heitt / imgwr; // Use the smallest proportion that the image is the best fit in the MaxWith X MaxHoight box. If (ratio 1lt; ratio 2) {ratio = ratio 1; } And {ratio = ratio 2; } Var Canvas = document.createElement ("canvas"); Var Canvas Contact = Canvas. GateConttex ("2D"); Var canvas coppie = d

javascript - Detecting Available Storage with IndexedDB -

I have written an offline application which uses the IDB to store images and text that are usually used offline Is present in a MySQL DB for However, I'm trying to explain one way that I can read the limits on devices memory for indexDB. I am currently using the following method to determine, though it only works in Chrome. I'm using snippets from here, which comes in storageinfo for webkit, although if someone is ff & amp; IE & amp; Amp; More specifically the Safari who will be great. Whatever I have collected, the quota used for everything that is stored by that browser not only for IDBI, however, what I am using is the Remaining Quota I Either request an AJAX request on the server to get the estimated size of all the files that will be stored and will work if there is sufficient storage or I will calculate the amount stored in IDB and if there It is enough to store more. I was wondering if there was any more 'systematic' approach? And check the re

java - How to combine State design pattern and Depedancy injection -

I'm trying to combine them in this Java 1.7 code (if possible): < Pre> view class {private state _state; } Intact Class State {View protected _view; } The class extends to the UserState state {} class extends the AdminState state {} I have tried to understand them better by using these articles: and But I'm just more confused. My questions are: Can I inject some of the states in view class and avoid the state instance of? What is there to get in my code? Thanks in advance. The problem is that you depend on injection injection for beginners. You are trying to inject circular dependency. I believe. Read that article, it does a better job than I am doing. However, in a nutshell: you are trying to do so (stolen image from the article): + --------- + - -------- + | A. & Lt; ----- | B | | | | | | ----- & gt; | | + --------- + + --------- + Which class do you inject for the first time? If you are trying to create B , then you need a

html - Line-height in div not working as expected -

Image
A div to me in which I have put paragraphs of text, images, links, etc., I use the old line Unable to do property I retrieve this content from my database using PHP. There will be a specific scenario, & lt; Div class = "story" & gt; Now there are many complaints we will study this matter ... do we need a separate policy or some kind of explanation, we will clarify this soon. Now there are many complaints we will study the matter ... whether it is a separate policy Need or some kind of explanation is required, we will clarify it soon & lt; / Div & gt; . Story {line-height: 200px; } I type into content in one and it is stored in DB. Now I see that as far as I've finished my line by pressing the physically entered, I get a gap of 200 pixels. Based on the screen resolution and other things, can a line be alright anywhere between the lines? Although it's working something, Edit 1: Yes I have tried word-wrap: break-word does not work.

java - How to instrument / advice a Spring Data (JPA) repository? -

I failed in trying to advise Spring Data JPP repository. The goal is to target all non- zero public methods in a particular repository annotated with target custom annotations (ResourceNotFound in this example) and when a return value is either null. City, Long & gt;, JpaSpecificationExecutor & lt; City & gt or an empty archive @Repository @ResourceNotFound @Transactional (read only = true) Public Interface CityRepository JpaRepository & lt Expand { @ResourceNotFound . Public void beanAnnotatedWithResourceNotFound () {} @Pointcut ("execution (public * * (..))" public ("zero" (com.digitalmisfits.spring.aop.annotation.ResourceNotFound * ) "@Pointcut Public Law () {@ @ (" Bean Untotted With Resource Notfoud () & amp; Public Law () ") Public Object PublicMethodInsideAClass Marked Wise Resource Notfound (ProceedingJoinpointPJP) Throwshell { System.out.println ("publicMethodInsideAClassMarkedWithResourceNotFound"

Excluding particular tests in Boost.Test -

मुझे गैर-मौजूदा विकल्प के एक व्यवहार की आवश्यकता है test_launcher --exclude_test = 'बेंचमार्क *' ? क्या बूस्ट में कोई कामकाजी तंत्र है जो कि एक ही प्राप्त करने के लिए इस्तेमाल किया जा सकता है? आप उपयोग कर सकते हैं इसके बजाय, क्योंकि यह आपके परीक्षणों को तार्किक रूप से समूहित करने का एक आसान तरीका है। Boost.test कमांड लाइन से शक्तिशाली इकाई परीक्षण विकल्प प्रदान करता है, विशेष रूप से आपके मामले में संशोधक

remove item from system.array in PowerShell -

यह मेरा $ array है: नाम GUID - ------ पीसीएएसएएए पीसीआईएफ़एबीबीबी पीसीएक्ससीसीसी पीसीएंडडीएएएए पीसीसीडीसीडीसीडीसी पीसीएडी 3 एएएए पीसीएडी 3 सीसीसीसी ये मेरी स्क्रिप्ट है: $ गइड = " सीसीसीसी "$ कामनाम = $ एरे | | जहां Guid -q $ Guid | नाम $ array.remove ($ workingName) का चयन करें # ब्रोक! मैं क्या हासिल करने की कोशिश कर रहा हूं यह है कि अगर $ Guid = "CCCC" यह नाम के सभी उदाहरणों को निकाल देगा और सरणी से CCCC , जहां CCCC मौजूद है, इसलिए इस उदाहरण में पांच लाइनें (PC001 के लिए तीन पंक्तियां, PC0003 के लिए दो पंक्तियां), अगर यह BBBB यह केवल पीसीएक्स के लिए तीन पंक्तियां निकाल देगा। एफवाईआई: यह बहुत बड़ी स्क्रिप्ट का हिस्सा है $ गइड = "सीसीसीसी" $ कामनाम = $ array | | जहां Guid -q $ Guid | चुनें- एक्सपैंडप्रार्टी नाम $ array = $ array | जहां {$ _। नाम -नोटिन $ कार्यनाम}

javascript - How to create vendor bundles with latest Browserify (6.x.x)? -

Well, now we are using BrowserFet 2.x for a while. We are going through some refactoring so that we want to update the latest browser in the future to reduce the future leap forward. Unfortunately some external bundles are controlled. In the old version we can simply tell Browserify, which requires the modules to be excluded from the bundle and they need something else - basically what it is. Version 5.0.0 has some major changes in BrowserWorld Internal. Let's take this command for example. The debug module is the NPM module. BrowserFiD Debug-o vendor.js Running this command in the browser command @ 4, the output file will look like this: requirement = (function ... {"debug": [function (required, module, export) requires {module.exports = ('2 BVKWP'));}, { }}, "2 BVKWP": [function (requirement, module, export) {// actual code debug module}, {}]}); now looks like Browserify @ 5: required = (function ... {1: [function (required, mod

python - Pandas/Numpy: Calculate current state series based on binary signals -

I have 2 chains of binary "signal", let's call them "entry" and "steve". Entry == 1 means adding from current to 1 (for some maximum time) and staying with == 0 to set the current position in 0. Entry: 0 My code now calculates a combined current state: State: 0 1 2 2 0 1 Currently, I use the following code, unfortunately, it is very slow (depending on the maximum time) (PDS time series in state / stay / entry): State = copy.deepcopy (entry) state [stay == 0] = 0 # state first run [(entry.shift (1) == 1) & amp; (Stay == 1)] + = 1 # Maximum time (2, maximum_time + 1) second for the interval in the range: state [(entry.shift (lag) == 1) & amp; (Pd.rolling_mean (stay, interval) == 1)] + = 1 How to vector this code for better performance? thanks a lot! Finally, using some nimety functions, now found a solution: def calc_state_series (insertion, stay, max_time = 5): reduce = (copy.deepcopy * entry) * 0) .filana (0) # to ent

entity framework - Foreign Keys in Web API 2 - Best practices? -

Actually I am writing an API using Web API 2 and entity framework on backend. Say I got the person property with the foreign key for the order property. Sometimes the customer needs a person's property, sometimes it does not happen. How should I go about this? Should I build two ways: / API / Individual / 1 & lt; - without any orders / APIs / individualists / 1 & lt; Orders the person In my opinion, it seems like a lot of ways. I know that the queryable attribute exists that provides support for the client, which uses the $ argument to include the assets - although if I can escape from it I will not use query attribute. What are your suggestions? From the top of my head, there are some options. Option 1 Many methods in API Public Person GetPerson () {...} Public Person GetPersonWithOrders Pass a flag in the method (...) {...} Option 2 : Public Person GetPerson (bool getOrders) {...} Option 3 You can call the caller to quer

swagger - Where can I find / modify Loopbackjs model metadata? -

As you can now, the loopbase framework shows a snugger-based look at your API end points and methods To explain in brief. The problem is that this interface is very interactive. I have to give an API-Docs (ISH) document for my API, and I am currently adding / normal / JS file to the file , but I suspect that I am changing the wheel here again. In order to display your interface for Swagger-UI / Lopback-Explorer, the endpoints should already highlight some kind of metadata, right? I would like to receive it and complete it with the description, example, custom status code and "try it" button which users will see, they will not appreciate much interactivity. You can click on the "RAW" button on the far right of any model in the "Safar" loopback Explorer For your loopback model and you will see the Swager JSON that describes the model. If you really want to customize your API Explorer interface, see this article: Then you can use model swa

windows - How to assign variable names to each for loop item - Powershell -

I would like to be able to re-enable a computer (pulled through monitor) through an array of monitors And then assign each one to its own value, so that I can output results in CSV, each monitor, MFG, date, SAP, on my column. For example: Monitor 1 MFG Monitor 1 SN Monitor 2 MFG Monitor 2 SN Dell 12345 HP 05156 I know how to output in the CSV already, there is a problem in facing each other's problems with their variables. $ monitors = get-wmiObject -namespace root \ Wmi -Class wmiMonitorID -Computer name "PC" $ monitor | % {$ I = 0} {"$ _"; $ I ++} This gives me every instance name of every monitor on the machine, but how do I go about grabbing serials etc <$ p> Good ... Here's how you will do this. It seems that wmi needs to change the data of some things into a readable form. $ monitor = get-WMI object-namespace root \ wmi -Class wmiMonitorID $ obj = Foreach (Monitor $ monitors) {[pscustomobject] @ {monitormf}

sql server - Invalid length parameter passed to the LEFT or SUBSTRING function in row concatenation -

I get the error "pending invalid length parameter for SUBSTRING function" on this function, it takes numbers from strings Is not like "abracadabra {34}" or in the string "{}" if not, I do not have the "case", but it seems that it does not work properly, definitely with this specific case Works perfectly - "abracdabra {34}", but because of the complex situation, Kshn can not see with the other cases. Maybe you get a mistake, just by looking at a glance. Please help me Function Function (@ NIODOP) Returns Varchar BEGIN DECLARE @Sreturn varchar (1000); SET @sreturn = ''; SELECT @sreturn = CASE CHARINDEX ('{', wp.description) WHEN 0 THEN @Sreturn ELSE @Sreturn + SUBSTRING (wp.description, CHARINDEX ('{', wp.description) + 1, CHARINDEX ('}', WP (Description) - CHARINDEX ('{', wp.description) - 1) + ',' by the end (/ * select some * /) TTT, RB_Worclass YP where wp.classified = ttt.ap depen

c# - How do I fill a combo box bases on other combo boxes -

I have a class that hex for a command sent to a device and a bunch of text string (30) makes. Public string TmclRotateLeft public string TmclRotateRight (Bull bin, string address, int motor, int value) public string TmclStoreGlobalParameter (Bull bin, string address, String type, int motor) public string TmclSetCoordinate (Bull bin, string address, string type, int motor, int value) I'm making a UI I actually with the command and combo-boxes for the parameter I want the user to the first combo box, command, and combo-boxes will be populated with the appropriate parameters of the command to choose from. Most of the parameters have only a few options, which are in addition to the price which can be anything. What is the best way to accomplish this? Thank you! Use databbound combobox to go one way, you can use other combo During the property, you can set any countable types (such as array or list ) during the of DataSource of the box The selected index changes

sql - MySQL - Select multiple rows from one table whose IDs are stored in another table -

I am using a JOIN - statement to select my data from my MySQL database . Tables look like: table "user" + ---- + ------- + ---------- + | ID | Name | Password | + ---- + ------- + ---------- + | 1 | Mike | Test | | 2 | Tony | Test1 | | 3 | Frank | Test2 | + ---- + ------- + ---------- + Table "Games" + ---- + ----------- + --- -------- + --------- + --------- + | ID | Player1ID | Player 2 ID | Score 1 | Score P2 | + ---- + ----------- + ----------- + --------- + --------- + | 1 | 1 | 2 | 5 | 2 | | 2 | 3 | 1 | 2 | 1 | + ---- + ----------- + ----------- + --------- + --------- + I like SELECT * games where Player1ID = 1 or Player2ID = 1 plus users' names and not just their ID. Can somebody help me out? User Join the table with two different names so that they differ Can select g *, As the U1.name player1, u2.name player player as player 2 player in user g in U.U.U.U.Uid 1.id = g.player1idUU U2 on UU 2.ID = G Join Player2id

.net - TcpClient - how to determine when bytes are delivered? -

When using TcpClient, how do I know what the server is or is not found? For example, let's say my message is a long string: Prefix string myAppMessage = "long coding, bla, bla, bla, ....." byte [] allBytes = Encoding ASCII.GetBytes (myAppMessage); And I want to completely close the string with TCP, and I want to know that the entire string was distributed and received by the server. There are some common methods of sending data through TCP: var client = new TCP client (IP_ADDR, PART) client. Gatestream () Type (all beta) <>> In the first case, do I call it on the stream after calling it flush () Is given? I think one or both of the above calls are blocked. If it is complete without exception, can I understand that the whole message was received / received? You need to get approval on the other side. Option: The remote party sends you an acknowledgment. Remote party shutdown (read) connection. Call Read until it returns 0. 0 sign

Ruby file full path -

I am writing a program where I cycle through the subfolders of a target folder through all the files and in it What is it written So my local folder looks like this folder - subfolder --- file --- file --- file - subfolder --- file. . . So I have one loop through all subfolders and for each subfolder, I'm calling a method that basically works the same, but in subfolder and every file Another method to call (parsing) is a file logic that I have a Dir.foreach (folder) {| File | Method (file)} was obtained through the command. So it looks like: Dir.foreach (Dir.pwd) {| Folder | Call_method (folder)} def call_method (folder) Dir.foreach (folder) {| File | The method of reading (file)} end that final method (read_method) should open the C method and paras as a full path to a file (so that the program can open it ) That's why I'm using reading the file. Instead of returning to C: / folder / subfolder / file in Read_method, it returns back as I want, except

javascript - What difference betwwen Object.getPrototypeOf(Object) and Object.prototype? -

& gt; ऑब्जेक्ट.गेटप्रोटोटाइपऑफ (ऑब्जेक्ट) [फ़ंक्शन: रिक्त]> gt; Object.prototype {} मुझे अंतर का परिणाम क्यों मिला? लेकिन अगर मैं इसका उपयोग करता हूं: & gt; ऑब्जेक्ट.टेटोटोटिपॉपऑफ़ ({}) {} सबकुछ ठीक है। क्या किसी भी बिंदु से मुझे मिलेगा प्रोटोटाइप ओफ़ के बारे में ?? वह ऑब्जेक्ट है जिससे अन्य सभी वस्तुएं उत्तराधिकार हैं यह अंतर्निहित वस्तुओं के लिए जड़ पर है एमडीएन दस्तावेज से: जावास्क्रिप्ट में सभी ऑब्जेक्ट्स ऑब्जेक्ट से उतरते हैं; सभी ऑब्जेक्ट्स Object.prototype से विधियों और गुणों को प्राप्त करते हैं, हालांकि वे अधिरोहित हो सकते हैं [...] Em> किसी विशिष्ट ऑब्जेक्ट के प्रोटोटाइप एमडीएन प्रलेखन से: ऑब्जेक्ट। टैग प्रोटोटाइप () विधि प्रोटोटाइप देता है (अर्थात आंतरिक [[प्रोटोटाइप]] ) निर्दिष्ट ऑब्जेक्ट। विभिन्न प्रकार के ऑब्जेक्ट्स में भिन्न प्रोटोटाइप हो सकते हैं। उदाहरण: & gt; Object.getPrototypeOf (ऑब्जेक्ट) === फ़ंक्शन.प्रोटोटाइप सच ऑब्जेक्ट एक फ़ंक्शन है, इसलिए उसका प्रोटोटाइप फ़ंक्शन.प्रोटोटाइप । & gt

c# execute command line like command prompt? -

Text after "div class =" itemprop = "text"> I used to execute some command prompt lines in a global variable in C # and AC # code to store results Want to write code for the next part of the second part of the code? I bought a device and I installed its driver. The only way to get your data is by using the command line in the command prompt. No API is available but, I want to do so in C # so that I am having trouble. I have some code and it does not work for some reason. Note, I used logic input = "date" is for illustration purposes only. My job is not "date", but to get some logic data. static void key (string [] args) {System.Diagnostics.Process Process = New System.Diagnostics.Process (); System.Diagnostics.ProcessStartInfo startInfo = New system. Diagnostics. Process STARTINFO (); StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; // CMD program startInfo.FileName = "cmd.exe"; // Set my debate date is

vb.net - Remove a duplicate Context.vb files from Entity Framework -

I have a problem with the EF6 in VS2013. I have a web application project in the database-string connection for the first model Had to modify, so I followed the advice in the best answer and gave it my web Removed from the config file. Firstly it seemed to work fine, I removed the connection string from the unit designer, I ran the "update model from database", the connection string was created again, but then failed with many errors similar to my build: < After some digging, I came to know that when I reconfigured the connection string, then there are several definitions with the same signature in the public sub-new () Another model Created. Model vb file Model.Context1.vb and both are still referenced somewhere. Since then, I have opened every file in the folder in which reference to my EF model in the context of Notepad. Vb Or kantex 1 It has been discovered in the context of VB and it is empty, if I delete the file, then my creation can fail to tell the file, so

jquery - Change one DIVs Color on several -

Image
I'm trying to change a divs background color by clicking on one of the images, the second part of the new DIV color image ID should be there. CSS #box {width: 200px; Height: 200 pixels; Background color: # 3f5d5; }. Black {background-color: # 000000! Important; } .red {background-color: # 990000! Important; } .blue {background-color: # 990000! Important; } .Green {background-color: # 990000! Important; } html & lt; Div id = "box" & gt; To change BGCOLOR & lt; / Div & gt; & Lt; Br / & gt; & Lt; Img id = "color black" src = "picture / black png" alt = "" /> & Lt; Img id = "color red" src = "picture / red" "alt =" "/> & lt; img id =" blue to color "src =" picture / blue.png "alt =" "/> Your ID values ​​are not valid. Use the data attributes to store "meta data" (such as color names or hex value etc): Example:

sql server - PHP mssql_query upgrade 2500 connections advice -

itemprop = "text"> I have 3 servers, about 10-year procedural code that was developed in php using the mssql_query function so that my understanding Has been excluded from 5.3 and I am wondering what is the best way to update this code. I have created a database wrapper class and all my SQL statements have started running through it instead of calling the PHP function, but it does not help me for any of those older applications Which will take a very long time to update. I have thought of creating a PHP 5.5 or above server and gradually migrating applications, but it looks like a complete mess because there are so many classes that rely on all applications We do. Any advice would be greatly appreciated. Both extensions are quite consistent, so an existing application in MySQLi without much difficulty It is possible to upgrade. It is not as easy as sed -e's / mysql_ / mysqli_ / g ' , but it has automated tools for example, this is the one: < /

java - GWT Highcharts - Semi circle donut -

I am using GWT Highcharts and want to make semi circle donuts. It is done in javascript with plotOptions.pie.startAngle and plotOptions.pie.endAngle . There is no method for this in GWT Highcharts. Then I tried to manually set it with .setOption ("/ plotOptions / pie / endAngle", "90") , but it had no effect. Maybe it was not supported by the Highstock 1.2.4 (the latest version which is supported by GWT Haittechts)? My code looks like this: last chart chart = new chart () .setType (Series.Type.PIE) .setChartTitleText ("Browser on a specific website .setPlotBackgroundColor (string) faucet) .setPlotBorderWidth (zero) .setPlotShadow (incorrect) .setOption ("/ plotOptions / Pie / startAngle", "-90") .setOption ("/ plotOptions / Pie / endAngle "," 90 ") .setPiePlotOptions (New PiePlotOptions () .setAllowPointSelect (correct) .setCursor (PlotOptions.Cursor.POINTER) .setPieDataLabels (New PieDataLabels () .setConnec

rest api multi-tenant security -

I have a question in a multi-tenant about empowering apis and security environment: imagine an endpoint: API / branches: branch ID / account / account ID authentication through Bearer Tokens (oauth2) goes. Each token contains a group of claims related to the user coming in. A branch ID is included in the token, and each user is related to a branch. Security restrictions are as follows: A store GET request to be connected to branch ID token claims. The account ID should be a valid account within the branch identified by the branch ID. The question is: which of the following solutions is correct? Maintain endpoint: API / Branches: Branch ID / accounts /: Account ID and perform necessary security check Change the end point to: api / accounts / Get account ID, branch ID from token, and then check remaining security. The application being a multi-tenant means that each branch is a tenant, and each user can access only one branch information. Thank you! I

vba - Importing More Than 65.535 rows to MS Access from Excel -

I am running the following code for importing a whole sheet from using Excel, sheet has 77K rows, but access Is only 65.535 to import, how to fix it, no clur? Both are Excel and Access Edition 2013. Import (importa) string dim FIM string DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12 as in the form of dim RA DAO.Recordset dim inicio, _ "NOMEBASE", application. CurrentProject.Path () + "\ Abre_Envio_Novo_Layout.xlsm", that is true, "menu BJ25: BM26" set db = CurrentDb () set to R = db.OpenRecordset ("NOMEBASE") inicio = rs.Fields (2) .Value FIM = rs.Fields (3) .Value DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, _ "base", Application.CurrentProject.Path () + "\ Abre_Envio_Novo_Layout.xlsm", is true, "Mailing_Recebido A: Ax" rs. After the end function should be acSpreadsheetTypeExcel12 acSpreadsheetTypeExcel12Xml to import the Excel 2010 workbook.

php - Array_merge unknown amount of arrays as variable variables -

Thanks for always helping out. My code generates an array in the following format $ {'Ready Format' $ B} = $ temparraytwo; $$ Ready for $ $ ready formerge3 etc ... > Which works well and we know that we know the values ​​present with the $ B which we need to merge. However, I can not see how to do it when we do not know how many arrays will be created before running the script. Basically I want to use the following to get the results, but you see that I can only do this for the amount of results which I think is not the actual number of the result Will give Any help? $ outputmultidimensionalevent = array_merge_recursive ($ {'ready format'. $ B}, $ {'ready format'. $ B}); Print_r ($ outputmultidimensionalevent); Echo & lt; Br / & gt; '; Your problem is the result of poor design. Instead of: $ {'Ready Format' $ B} = $ temparraytwo; You should do something like this: $ Ready Format [$ b] = $ temparrayt

sql - Loop and assign non-unique GUID to sets of values? -

I easily believe this, but I can not go past the concept for the syntax I have a table of features like many rows where the name of the feature can populate: [nAME], [GUID] Fred, minus Fred, minus Fred, minus Tom, null Mary, null Mary, null Mary null I null I have assigned a GUID to the name you want to do: Fred { 3b26af27-9d42-481c-a8c8-be1819dccda5} Fred, {3b26af27-9d42-481c-a8c8-be1819dccda5} Fred, {3b26af27-9d42-481c-a8c8-be1819dccda5} Tom, {ee64b706-def0-4e5c-a5fd-0c219962042e} Mary , {fd158f90-9705-4a18-b82c-baca29441401} me, {fd158f90-9705-4a18-b82c-baca29441401} me, {fd158f90-9705-4a18-b82c-baca29441401} me, {fd158f90-9705-4a18-b82c-baca29441401 } table (name varchar (30), GUID uniqueidentifier) insert @tmp announced choose to select from (MyTable @tmp x.Name, NEWID () the difference name) X update MyTable set GUID = tmp.GUID from MyTable T insider @tmp which t.Name = on tmp tmp.Name

javascript - Hide/Show validation form issue -

I want to create a simple verification form, but Ive found a little error in fixing the file. After clicking on the login entry I see a login_window (varies from display: none to display: block) then I want to show login and password input When I fill in something other than "Username" and "Password", then I should be shown a alert message. Instead, it keeps hiding the login_windows even when there is no form (I just submit and login_windows Hidden) HTML: & lt; Div id = "login_window" & gt; & Lt; form name = "login_form" onsubmit = "return validate_login ()" method = "post" & gt; & Lt; Label & gt; Login & lt; / Labels & gt; & Lt; Input type = "text" name = "usr" placeholder = "user name" & gt; & Lt; Br> & Lt; Label & gt; Sign in & lt; / Labels & gt; & Lt; Input type = "text" name = "psw" placeholder = &

c# - Get all inherited classes of a generic abstract class -

I am exploring a way to achieve all the sections that get the general abstract class, and each of them But do one method classes. I went to class implementation to implement it, something like this: public abstract class abstract and end Lieutenant TresponseData & gt; Where TResponseData: IResponseData {public abstract zero search (); Public abstract GoodData Bindetata (TResponseData data); } Public interface Aiarssponsdeta {} public class Aarspons: Aiarspisensdeta {} public class Breshpens: Aiarssponsdeta {} public class A: Abstrekvest and LT; Essence & G; {Public override void search () / // AResponse // call override AResponse} public with Bainddeta () Guddata Bainddeta (Aarspons data) bind data GoodData from {// AResponse}} public class B: Abstrekvest & lt; BResponse & gt; {Public override void search () {// BResponse // call public override with BResponse} with Binddeta) GoodData BindData (BResponse data) Tie GoodData data from {// BResponse}} is workin

c - When a library my program depends depends on another library -

When a library relies on my program, then depending on any other library, Dynamic linking? When I compile my program with dynamic linking, can I get both the libraries while loading? Thank you. When your exe relies on a DLL, then you need to add the link to the import library ALB when Link to EXE. When your DLL relies on A DLL B, you should add BBL to the link library while linking to ADLL. When you run EXE, both DLLs will be available in the search path. When you use a DLL, include the # header file which defines the interface DLL when compiling your sources. Import libraries of DLL (EliB, BLB) are not required. The linker creates executable modules in the second phase of the manufacturing process. Linker input compiler output, stable libraries, runtime's MSVCR 110.dll and import library of your ADL import library. So when I say "When Linking" I mean Operation of Linker during the creation process The compiler has done this work at this point. If

html - Align image inside DIV horizontally and vertically -

I am trying to align the image inside the horizontal and vertical DIV. The problem is that I tried many ways and none of them worked for me. This is the code I am using: css img {max-width: 100%; Vertical-row: middle; } # Slika {float: center; Height: 126px; Width: 111px; Text align: center; } HTML & lt; Div id = "slika" & gt; & Lt; img src = "picture / 2105602.png" width = "auto" height = "auto" alt = "2105602.png" & gt; & Lt; / Div & gt; jsfiddle: Can you share your thoughts with me? I am not getting the solution, it always keeps the alliance on top. JSFiddle - Max-width: 100%; Top: 50%; Status: Relative; Conversions: Translator Y (-50%); } #lice {height: 126px; Width: 111px; Text align: center; Limit: 1px # 000 solid; }

java - How to return an object that was deleted? -

I have a method that is considered to remove a list list (iList) in a list list (i) , When the inventory item has been entered as part of the description. This method must be returned to the deleted item, and I am unsure how to do it. Here is my code so far Delete public inventory item- inventoryitim (string descriptioni) {int index = -1; Boolean result = false; (Inventory I: iList) {if (i.getDescription (). ToLowerCase (). Start (descriptionIn.toLowerCase ())) {index = (iList.indexOf (i)); Result = true; } If (index> = 0) {iList.remove (index); }} Return tap; } I do not use an iterator can . [...] I need to use each loop Here's a way: public inventory Itam DeletionInventory (In String Description) (Inventory Item Item: iList) if (item.getDescription () .toLowerCase () with .starts (descriptionIn.toLowerCase ())) {iList.remove (item); Object back; }} Return tap; } Note that this removes a maximum of one object from the list. If there are many matches,

rabbitmq - Any way to invoke a RecoveryCallback in a RabbitTemplate send operation? -

मैं वर्तमान में स्प्रिंग AMQP संस्करण 1.3.6.RELEASE और Spring Retry 1.1.2.RELEASE । स्प्रिंग एएमक्यूपी प्रलेखन खंड के अनुसार एक RetryTemplate में से गुजारें द्वारा पुनः प्रयास क्षमताओं को जोड़ सकता है। क्या RecoveryCallback कार्यान्वयन? मैं कार्यान्वयन की समीक्षा कर रहा था और मुझे कोई भी नहीं मिला। उपयोग के मामले में मैं सोच रहा हूं कि अगर कोई * भेज () निष्पादन विफल रहता है क्योंकि दलाल नीचे है I अपने खुद के कस्टम तर्क को लागू करना चाहते हैं। मैं समझता हूं कि मैं कनवर्ट एंड एसेंड () को अपना खुद का RetryTemplate में कार्यान्वित कर सकता हूं और कार्यान्वित कर सकता हूं कोशिश {...} पकड़ (AmqpException ई) {...} लेकिन अगर मैं स्प्रिंग एएमक्यूपी ने एक क्लीनर कार्यान्वयन प्रदान किया तो मैं उस सड़क के नीचे नहीं जाना चाहता था। < P> आप सही हैं: अभी इस तरह की कोई योग्यता नहीं है। एक उठाने के लिए स्वतंत्र महसूस करें और हम पता करेंगे धन्यवाद। और मुझे लगता है कि आप एक वैकल्पिक हल के साथ सही तरीके से जाते हैं: आप वास्तव में अपने RetryTemplate उदाहरण को कच्चे

python - Flatten (an irregular) list of lists -

Yes, I know that this topic is covered before (,,,,) but as far as I know, all solutions, except for one, fail in this type of list: l = [[[1, 2, 3], [4, 5]], 6] where is the desired output [1, 2, 3, 4, 5, 6] or Probably better, an Iterator I've seen that the only solution works for an arbitrary nest victim: <-> def flatten (x): Results = [] for X in L: if hasattr (a , "__iter__") and not isinstance (el, basestring): result.extend (flatten (el)) Other: result.append (el) Return result Flaton (L) Is the best model? Did i ignore something Any problems? Using generator functions can make reading a lesson easier and perhaps boost your performance. . Python 2 Deaf Flaton (L): L for L: if not isestance (L, collection is notable) and is not (L, basestress): <3 python 3 in python 3 in Flaton (L) for the sub: yield sub: yield L basestring is no longer there, but you can use a code of str and bytes to get the same effect. From t

Javascript array shuffle shouldn't output two next to eachother -

I have found an array that is full of characters see examples below. I first know that the array is shuffling. Well I found it the most famous shuffle called Fisher-Yates Firbadal. Now I want to do this output, eg. F2 should not be next to F and F ' and the other goes to D D 2 or D ' . It outputs such as: RB2 UFLF D2 ... and so on. No more: R B2B ' LF D2 ... Any help, suggestions? I know that I should check the first character with charite () , but I am not an expert at that function. Javascript function shuffle (side) {in the context of var elements = sides.length, temp, randomIndex, last; While (determining elements> 1) {randomIndex = Math.floor (Math.random () * elementsRemaining--); If (randomIndex! = ElementsRemaining) {temp = sides [edit the elements]; Party [determining elements] = side [random index]; Party [random index] = temporary; }}; Return party; } "Side", "U2", "L2", "D2", "U2

javascript - Ember set belongsTo associantion works only first time -

This code should provide the user a screen to update the template of your portfolio. In this screen the server always gives 5 templates and the portfolio already has a template associated. Model App.Portfolio = DS.Model.extend Color: DS.attr 'string' Template: DS.belongsTo 'template' App.Template = DS.Model.extend Title: DS.attr 'string' Portfolio: DS.hasMany ('template') Route App.PortfolioRoute = Ember.Route.extend setupController: (Controller, Model) - & gt; This._super (controller, model); Load all the templates for the #Proplio Screen Controller. Templates, this.store.find 'template' Controller PortfolioApplication Portfolio Controller = Ember.ObjectController.extend Selected Template: Empty Examination Template Selection: (- & gt; @set 'model.template', @get ('selectedTemplate') console.log @get 'selectedTemplate' console.log @get ' Model 'console.log' -------- '.)

jquery - Combine 2 functions into 1 -

How do I add this function? Basically, when the checkbox is clicked on, something happens and if the page loads and if the checkbox is already clicked, then it is the same as the other thing. $ (document) .on ("click", ".dimensions", function () {var size = $ ('.td-hide'); if ($ ('Input (': Check')) {size.show (); $ ('single-select-sm'). CSS ('width', '148 pixels')} and {size (hide) ; $ ('Single selection-sm'). Css ('width', '230px')}}); $ (Function () {var size = $ ('. Td-hide'); if ($ ('input # dimension') is (': check')) {size.show (); $ (' Single CSS ('width', '148px')} and {size: hide (); $ ('single selection -sm'). CSS ('width', '230px')}}; var myFunc = function () {var size = $ ('.td- hide) '); If ($ (' 'input # dimension' ') is (': check ')) {size.show (); $ (' single select-s

angularjs - Kendo grid with DropDown in column has messed up styling -

Image
I have tilted down a dropdown editor inside a grid column, and I have followed the central example here: I really am a donddown editor who is working in AD / edit mode, and it has been tied up with datasource. However, I do not understand why the style is all messing up. As you can see in the image below, a dropdown is provided, but there is also a text box located below it. All my plunker examples look fine in style, but not in my actual project code. My HTML: vm.userDimenGridOptions = {// Kendo Grid - User dimension ... selection: correct, sorted: right, page-worthy: right, column: [{field: "id", width: "field:" 80px "}, {region:" hierarchy "," 50px " Hidden: true}, {field: "came "Width:" 120px ", editor: DimenDropDown, template:" # = Dimensions # "}, {{template: Click on the button =" return (\ "# = UID # \ ')" & gt; Up & lt; / Button & gt; Click on the b

How to keep the Spring Tool Suite maven JVM processes from placing java icons on Dock for a mac? -

का उपयोग करना: मैक ओएस एक्स 10.9.5 वसंत उपकरण सूट 3.6.1.RELEASE एक फोर्क मोड में इकाई परीक्षण चलाने के लिए maven-surefire-plugin का उपयोग करना। स्प्रिंग उपकरण सुइट 3.6.1.RELEASE का उपयोग करना Maven-surefire- प्लगइन एक फोर्क मोड में इकाई परीक्षण चलाने के लिए। इस समस्या के सभी समाधान मैं वेब के आसपास पाया- Djava.awt.headless = सच में विभिन्न स्थानों पर: वसंत वरीयताएँ - & gt; जावा- & gt; स्थापित JREs- & gt; डिफ़ॉल्ट VM तर्क, MAVEN_OPTS,। मेर्रक, रन कॉन्फ़िगरेशन आदि। उनमें से कोई भी मैक डॉक को लोकप्रिय नहीं करने से आइकन रोक देता है। स्प्रिंग टूल सूट मैवेन जेवीएम मैक के लिए डॉक पर जावा आइकॉन्स रखने से प्रोसेस करता है? - मैक डॉक पर जावा कप आइकन को रोकने के लिए जावा वीएम पाने की कोशिश करने के लिए यहां और कहीं और वेब पर हर सुझाव प्राप्त करने का प्रयास करने के बाद, मैंने इसके लिए इसका कारण पाया है मामला। मैं उम्मीद कर रहा हूं कि यह दूसरों की मदद करेगी। कम से कम मेरे विशेष मामले में काम करने के लिए, हमारे pom.xml में यह सुनिश्चित करने के लिए दिया जाता है क

python - How to check potentially empty stdin without waiting for input? -

I am trying to read from the keyboard input without waiting for input. Its purpose is used in the "infinite" loop ala, while true:. So far I have been trying to manipulate the Library, but there is no luck. Although it does not wait to enter, it is still waiting for some input. I do not want to wait for this input, but if there is no input then simply check "" and come back or some placeholder . Here's what I'm doing: <> def readchar (): try fd = sys.stdin.fileno () old_settings = termios.tcgetattr (FD): tty.setraw (sys.stdin.fileno ()) ch = sys.stdin.read (1) finally: termios.tcsetattr (fd, termios.TCSADRAIN, old_settings) returns CH Diif main (): while right: current = readchar () If present == "few letters": print ("things happen") POSIX I / O functions that are finally contained in Python's file objects, in two different modes, blocking and non- Blocked, controlled by nominated flag. Specifically, the function say

header - Auto Submit URL generated by PHP script from Cron -

I wrote a small script, grabbing data from XML file I need some XML data to generate URLs. I am looking for a function, how do I 'use' a form I submit to this generated URL, 'deposit' (automatically sending) the script is executed by cron job and works 'hands-free'. Here are some parts of my script Thanks for your help! & lt ;? Php $ xml = simplexml_load_file ("xml.xml"); // XML $ GUST = $ xml- & gt; Make some differences from the Guste; // I can generate a working link ... echo "& lt; a href = 'http: // anywhere & amp; gust =". $ Gust "& TR = T" & gt; Activity Link & lt; / a & gt; "; // But I try to send this generated url from this cron job. //... no info...? You can use curl to post to the URL can do. Here's an example: $ dataToPost = array ('name' = & gt; 'Ross'); $ Handle = curl_init ($ urlToPostAt); Curl_setopt ($ handle, CURLOPT_POST, tru

javascript - What triggers my Preloader gif to show on Page, while Page is loading? -

Hi, I am trying to display a .gif while one page is loading new content I am ajax, javascript, I understand jquery, but how do I understand how to do it. Here is Div with GIF ... & lt; Div id = "loading" & gt; & Lt; Div style = "display: none;" Id = "overlay" & gt; & Lt; / Div & gt; & Lt; Div id = "popup" style = "display: none;" & Gt; & Lt; Img alt = "loading value" src = "/ images / loading 2. gif" /> & Lt; Div class = "dialogtext" & gt; In loading rates available, it can take a moment. & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Here's some javascript I've written that some of this works: I do not know how to trigger it, and would appreciate the help or reference < / P> Do you want to show loader GIF when an AJAX request is pending? You can use the most basic event

delete operator - Deleting objects in c++; -

इस सवाल का पहले से ही एक उत्तर है: < / p> 11 जवाब सी में आप को नि: शुल्क है कार्यक्रम द्वारा आवंटित की जाने वाली स्मृति क्या सी ++ में ऑब्जेक्ट के लिए भी यही जाना है? class सामान्य {// कुछ फ़ंक्शन declarations} शून्य उदाहरण () {सामान्य obj; / Obj हटाने obj के साथ काम करते हैं; } ओबज को हटाना कितना महत्वपूर्ण है; यहाँ अगर मैं मानता हूं कि फ़ंक्शन उदाहरण () को केवल एक बार कहा जाएगा? आपको हटाएं आवंटित किए जाने वाले किसी फ़ंक्शन के स्थानीय ऑब्जेक्ट नहीं है स्टैक पर आपको उस ऑब्जेक्ट को डिलीट करना होगा जो ऑपरेटर new का उपयोग करके आबंटित की गई थी। इसके अलावा, हटाएं ऑपरेटर संकेतक । आपका कोड स्निपेट संकलित नहीं होगा।

html - One line of text refuses to change color -

html I was doing a project to create a Google homepage in HTML / CSS and for the most part it was without any reason Coming out fine, I can not get the text inside "sign up" to change the color . & lt; Div id = "content" & gt; & Lt; Div id = "navbar" & gt; & Lt; Ul & gt; & Lt; Li id = "signin" & gt; & Lt; A href = "https: // account ..." & gt; Sign in & lt; / A & gt; & Lt; / li & gt; I call in these lines in CSS. #navbar {text-decoration: none; Width: 200px; Color: # 4c4c4c; Font-size: 14px; } # Signin {background color: blue; Font-weight: 800; Color: #ffffff! Important; Padding: 7px 12px; } I added it to ! Important was thinking that it would change, but did not do anything. It is also worth noting that this is just some code that has other items on the nav bar which are all the same true colors. I got the background-color to replace, but the actual text is not

ruby - OptionsParser execute methods? -

I'm sorry if this is a clearly obvious question, but the documents of opt-ons are totally horrible and I do not think its I was just a simple question, can I execute a method by using this option: DNS = new.new option = {} optparse = OptionParser.new do | Opts | opts.banner = $ usage options [: standard] = incorrect opts.on ('a', '-standard', 'standard DNS query') option [[standard] = true end option [: mail] = wrong option [ MX ',' - mail ',' Mx server quarry 'option) options [: mail] = true end option [: reverse] = false opts.on (' ptr ',' --reverse ',' reverse DNS lookup ' ') Option [: reverse] = true end opts.on (' -h ',' --help ',' display use ') opts exit end end option.parse! ARGV.Have | RGR | If option [: mail] dns.ptr_records (arg) if option [: reverse] end / former> it seems that I can not do this , Or I'm doing it wrong. Because in fact this is the only thin

debugging - IntelliJ IDEA debugger for Java: return desirable value from method during debug -

Eclipse has a "Force Return" feature which allows the method to return any selected item to the call. Is there such a facility in the Intel IDEA? The answer to VikingStaveval is now old. This facility was introduced in Intel IDEA 15. Open debugging, debugger window, select the Frame tab (next to the thread), then right-click on a frame / method in the list and select "Return force" and supply the price.

r - ggplot2 stat_function - can we use the generated y values on other layers -

Image
This question arose when I tried to attract a standard normal distribution with ggplot (easy to do with stat_function) Trying the area under the curve for different quintills - I was able to do this with geom_line and geom_ribbon to do a data frame with a range of values ​​for x and the corresponding dnorm value for each x (X = seq (-3,3, length = out), with the "bottom", and data = data.frame (figures, iFeil (x & lefthinum; conomorum (0.2) 1000) Data $ y = dnorm (Data $ x) Data $ Quintil & lt; ifelse (x & lt; qnorm (0.4), "secs", ifelse (x & lt; qnorm (0.6), "middle", ifelse (X & lt; qnorm (0.8), "fourth", "top")))) data $ quintals & lt; - ggplot (data, aes (x = x, y = y, fill = quintile) - factor (data $ quantal, level = c ("bottom", "second", "middle", "fourth", "top")) ) + Geom_ribbon (AES (ymax = y), ymin = 0, alpha = 0.5) + geom_line (color = &qu

objective c - "Combining" a CCSprite into a CCLabelTTF -

I have a game store in which the player can buy items I have a CCLabelTTF The price of an item and a CCSprite is an image of a coin next to it. Since the price of the item changes because the user receives more items, the label text coin CCSprite begins to overlap, which is next to the label, I am trying to create it so that the coin CCSprite is located on the basis of label status. Is it a better way to add CCSprite as a child to CCLabelTTF? Like CCSprite in CCLabelTTF I have it now: coin icon = [CCSprite spriteWithImageNamed : @ "Coin.png"]; [Coin mark setskel: 0.3]; PriceLabel.string = [NSString stringWithFormat: @ "% .lf", value]; [Price leakback add-build: coin icon]; I was also trying to set PositionInPoints, but whenever I set a status coin does not appear on the screen anymore, this is the main problem I am using this method. It will work fine without determining the position, but I need a coin located on the left of priceLabel . A

java - RuntimeExtension.class -- What does the ".class" mean? -

इस सवाल का पहले से ही एक उत्तर है: < / p> 8 जवाब मैंने दस्तावेज़ पढ़ा है Junit ExpectedException class के लिए, और .expect () विधि के लिए पैरामीटर सभी उदाहरणों में मैंने अजीब तरीके से लागू किया है जब आप अपेक्षित अपवाद प्रकार में होते हैं, तो इसमें एक क्लास एक्सटेंशन होता है जो कि किसी भी प्रकार की विधि नहीं प्रतीत होता है। क्या कोई इस वाक्यविन्यास को समझा सकता है? धन्यवाद। उदाहरण कोड नीचे है: सार्वजनिक अपेक्षित एक्सपोज़शन फेंक दिया = ExpectedException.none (); सार्वजनिक शून्य testPlusException () {thrown.expect (RuntimeException.class); वेक्टर टेस्ट व्हेक्टर = वेक्टर 1। प्लस (वेक्टर 3); } कॉलिंग। एक प्रकार पर क्लास को विशेष प्रकार का वर्ग ऑब्जेक्ट मिलता है। आप यहाँ विशेष के बारे में अधिक पढ़ सकते हैं।

.ssh/config file for windows (git) -

I am looking for a solution to how I can use more than one SSP key and I know That is a config file in the .ssh directory that it will work, but it does not work on windows. My problem is that I am using a private key to access the GIT server, so it seems: ssh: //git@example.com/directory, when I use the Tortoise I am doing it, then it works fine 'due to the possibility of choosing private key. But I want to use the GIT representative in my IntelIs IDEA and there is the option to use only the git native shell and it also works, if I put the key, called id_rsa In the .ssh folder. Now I want to use several SSP keys (so my key will be "id_rsa_test"), so how can I configure .ssh / config file under Windows, it works with normal GIT server? > One option IdentityFile which you can use in your ~ / .ssh / config file and each host You can specify the key file. host host_with_key1.net IdentityFile ~ / .ssh / id_rsa host host_with_key2.net detection

javascript - AngularJS: Argument 'Controller as short' is not a function, got undefined -

I have difficulty finding out what the problem is. Why is this code (index.html) run & Lt; Script type = "text / javascript" src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js" & gt; & Lt; / Script & gt; & Lt; script type = "text / javascript" src = "js / app.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; div class = "list-group-item" ng-repeat = "store.products in product" & gt; & Lt; Section ng-controller = "controller in tab form" & gt; & Lt; / Section & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; While & lt ;! DOCTYPE html & gt; & Lt; Html ng-app = "gemStore" & gt; & Lt; Top & gt; & Lt; link rel = "stylesheet" type = "text / css" href = "css / bootstrap.min.css" /> &a