Sunday, 15 September 2013

php - Pass id from HTML email to landing page, then use that to populate SQL query -


I have, we call 5 email threads (A, B, C, D, E), each email is different . Each email contains a link on a landing page

Then I have a php landing page wire frame that pulls data from a SQL database (currently MSQL, but can be changed using PDOs) ) So that different content can be populated. Therefore 1 php landing page, but 5 lines in the database to populate 5 different versions of that landing page, on which the email viewer links.

My current query in my landing page looks like this:

  & lt ;? Php $ result = "Select body_copy to low_engagement WHERE thread_segment = 'a3'"; $ Stmt = $ connection- & gt; Ready ($ result); $ Stmt- & gt; Executed (); $ Body_copy = ""; While ($ line = $ stmt-> fetch ()) {$ bodyCopy = $ row ['body_copy']; }? & Gt;   

I manually change the where section delivers thread_segment of 'a1', 'a2', 'a3' In, 'A4' and 'a5' are updated with the appropriate content according to each of the 5 threads in my landing page.

My question is, it is possible to mark HRM possibly in the HRM email. The landing page can communicate with some landing page saying this, for the link link which is linked to 5 emails / email links Coming and dynamically altering thread_segment value?

I am fairly new to PHP / PDO so I'm open to suggestions and / or directions. In my current research on this matter, I have still been researching about passing the variable through one of several mediums, but the content I am getting is in relation to the forms.

No insights are highly appreciated!

Yes, just pass thread_segment to the href of the email, such as: some.url.com/page .php? S = a3 and replace your pd like this:

   fetch ()) {$ bodyCopy = $ row ['body_copy']; }? & Gt;    

forms - Fill PDF template acrofield with HTML formatted text using iTextSharp -


After

I am using iTextSharp to fill in a pdf template for. The data I am using is kept in a database and formatted as HTML . My problem is that when I get the load AcroField this text I get it to break the line but with no bold and italicizing . I've already tried using HtmlWorker , but used to convert all the examples online HTML to a PDF But I'm trying to set up a AcroField in the PDF template will be appreciated. After looking through the expense forums and iTextSharp source code I got a solution after reading the text "itemprop =" text "

Rather than filling the acrophil with HTML formatted text, I used a column text I parse html text and load IElements in the paragraph. Then add paragraph to the column text. Then I use the ColumnText overlapping area coordinates on top of where Acrofield should be. Public Zero AddHTMLToContent (String htmlText, PdfContentByte contentBtye, IList & lt; AcroFields.FieldPosition & gt; status). {Paragraph para = new paragraph (); Column Text C1 = New Column Text (contentBtye); {List & lt; IElement & gt; Element = HTMLWorker.ParseToList (new stringreader (html text), empty); Front (element element in elements) {par.Add (element); } C1 Adelim; C1.SetSimpleColumn (Position [0] .position.Left, Position [0] .position.Bottom, Position [0] .position.Right, Position [0] .position.Top); C1.Go (); // Vital key !!! } Hold (pre-ex) {throw; }}

Here is an example of a call for this function

  string htmlText = ". & Lt; p & gt; Hello & lt; / P & gt; & lt; br / & gt; & lt; i & gt; World & lt; / i & gt; "; IList & LT; AcroFields.FieldPosition & gt; Pos = form.GetFieldPositions ("Field 1"); // field 1 is the name of the field in the PDF template that you are trying to fill / overlay AddHTMLToContent (htmlText, stamp.GetOverContent (pos [0] .page), pos); // Stamp In this example is pdfstammer   

While doing this, I had run a thing the fact that my Acrofield had a predefined font size as this function returned to the column at the top of the column Text is set, any font change in the function will be required. Here is an example of changing font size:

  Public Zero AddHTMLToContent (string htmlText, PdfContentByte contentBtye, IList & lt; acroFields.FieldPosition & gt; pos) {paragraph para = new paragraph (); Column Text C1 = New Column Text (contentBtye); {List & lt; IElement & gt; Element = HTMLWorker.ParseToList (new stringreader (html text), empty); Prior (scales element in elements) {advance (chunk of chunk in element. Chunk) {chunk.Font.Size = 14; }} Par.Add (element [0]); C1.AddElement (equal); C1.SetSimpleColumn (pos [0]. Position.Left, pos [0] .position.bottom, pos [0] .position.right, pos [0] .position.Top); C1.Go (); // Very important !!! } Hold (pre-ex) {throw; }}   

I hope this saves some time and energy in the future.

android - message of my notification not display in notification bar ,only title? -


I try to display the database contents (only two words) in the message of notification but only why the title appears ? Second problem: I used the Harmag Manager to trigger an intrasecavegative class (the class of the content of this code) every 1 minute, but if the data == faucet notifies me it should not have been in my situation

  ShowTimeDB RetrieverDB = new ShowTimeDB (this); RetrieverDB.open (); String Data = Show Retrieveer DBTet (); RetrieverDB.close (); If (data! = Null) {nm = (Notification Manager) getSystemService (NOTIFICATION_SERVICE); Intent = intent (new, in this, show today); Pending anticipated PI = pending iatactive (this, 0, intent, 0); Extreme X = (Charity) data; Notification n = New Notification (Ardoable.IC_Luncher, "You SOOO", System Syrtetime Millis ()); N.setLatestEventInfo (this, "ShowTime", x, pi); N.defaults = Notification.DEFAULT_ALL; Nm.notify (uniqueID, n);    

Notification notification instead. Try to build builder. Information notification items have been removed using the new notification () to use the notification. Builder class

I'm not sure what your second question means.

function - Matlab: How to close program legaly? -


I have a script running with many graphical handles, which I update in code here and there. My purpose is that when I close the program with Brutilla (with X button or Ctrl C) it will have to close it correctly.

I have overridden the default close function, even when sometimes I "handle invalid objects" when pressing it or pressing Ctrl + C.

I have a number of handles in the code, each should be checked or is there any other way to close this figure and the code is correct? (With something like 'quitting' but with close mateab IDE)

Thank you, boy.

You can validate the handle with isvalid Can check. You need a loop on your handle, check their validity, and close them if valid; You should probably have to push a ... try ... for good measure there over Something like this:

  function id1_DeleteFcn (hObject, eventdata, handle) errList = []; For NHndl = 1: Try to remove the handle (handle.mahndal) if it is unreal (handles. Handle (NHDL)) (Handle Mehndal (NHDL)); Mistake errelist = [errlist err]; End end end if length (err8ist) == 1 error ([mfilename ': ErrorClosingUI'], 'Error turning UI:% s', errList.message); Otherwise length (errList) & gt; 1% should probably make some clever errors with error messages ([mfilename ': ErrorClosingUI'], 'Many errors occured UI occurred'); End    

How to convert javascript inline code to jQuery? -


I have this work jQuery + inline javascript which causes conflict with existing jQuery.

  & lt; Script & gt; Var jq = jQuery.noConflict (); Function goto (id, t) {jq ("content box-wrapper"). Animate ({"left": - (jq (id) .position (). Left)}, 600); Jq ('# slide a'). RemoveClass ('active'); JQ (t) .addClass ('active'); } & Lt; / Script & gt;   
 & lta square = "active" href = "#" onClick = "goto ('# kr', this); Return back" & gt;  
 & amp; ; Lta class = "active" href = "#" onClick = "goto ('# n', this); return back" & gt;  

(I have tried to solve the conflict as you can see but I believe that conflict with inline javascript arises.)

How do I make this inline javascript Can i change Thank you.

You can tie it to:

  & lt; Script & gt; // var jq = jQuery.noConflict (); Function goto1 (id, t) {... return false; // Wrong return to stop the default action of the link // Once your DOM is ready, and a.active is available for Bound $ (document) .ready (function () {// a. Activate all clicks on active function 'goto1' $ ('a.active'). Click (goto1);}); & Lt; / Script & gt;   

Variable names like geto can be potential causes of confusion later on. It has been changed to goto1 .

F# FTP Fails where C# Succeeds -


I have a code written in C # (.Net 3.5) with this code.

php - Translation handling in Zend Framework 2 -


I am creating a multilingual application with the Zend Framework 2.

Currently, I have to apply the translatorware interface with each object a translucent output and use the translatorwaretrat. Therefore, to translate I'am form labels, error messages, and information, each form, input filter and a translator example injection in the controller object

Is this the right way to do this or is there a different approach In which the example of a translator needs translation in each object.

(I know that I can translate verification errors by injection to a default translator for the subbibitivator, but I like my own error messages)

Use principle modules as orm for zm2 and handle Doctor Extensions gedmo / translatable data translation

To obtain translatable, documentation Follow this part of:

Then run the schema tool to update your database.

highcharts - Change the zoom Type dynamically? -


I want to change "x" to "x" without creating a new instance of the zoom-type, I have to do it as if myChart.options.chart.zoomType

To greed, set the blank as a clone series after the high chars draw it blank.

  var series clone = [{Name: 'Euro to USD', data: [1,2,3,4,4,5,6,7,7, 8,8,8,9,10,14]}   

To Set Series Options

  Var chart Option = {chart: {rendereTo: 'container', zoom type: 'XI'}, range selector: {Selected: 1}, series: [{Name: 'USD to EUR', data: [1,2,3, 4,4,5,6,7,7,8,8,8,9,10, 14]}]} var chart = new highchart. Stock chart (chart option);   

And when you want to change the value of ZoomType, repeat the chart like this

  chartOptions.chart.zoomType = 'y'; ChartOptions.series = seriesClone; Mychart = NewHightes Storkart (chart option);   

Work example

multithreading - Capture IO of spawned program in Java -


I am writing a program in java that depends on a pre-compiled third party jar which is similar to my directory is. At runtime, my program checks if this file exists, then downloads it if it is not. Its main square is then executed. However, printed program prints a large volume of text directly on the console. Is there any way to 'capture' (and therefore hide) this output from stdout and apply directly to your parents' applications Return to stdin ? I would ideally prefer the children program inside the same JVM, so I have the runtime.axac () .

Java 1.5+ process builder class and process Use square. Remember that if you do not control your stream properly, the process will be blocked.

Conditional proxy server in python/perl/shell script -


I have an application that asks the host name: port for some service, some services during a webservice development One third is not available by the party or is not under construction, so to develop our application, I am thinking of using mockservices with soap as a stub for some services.

The problem is that I can only point out my application in one direction, so if I point out the house service, then I need to ensure that the fake service All services (& gt; 50), it is too overhead, so I was thinking of pointing to my application on a proxy server that would redirect some requests to Monarchives and send it to the actual service provider. Men will. Is there any way I can do this through a simple script?

Surely a thick sketch using perl:

  # ! Perl use strict; Use warnings; Plate :: app :: use proxy; My $ live_proxy = plack :: app :: proxy-> new (remote = & gt; "http://live.soap.service.com:80/"); My $ soapui_proxy = plack :: app :: proxy-> new (remote = & gt; "http: // localhost: 4567 /"); Sub (my $ env = shift; if ($ env- & gt; {REQUEST_URI} = ~ m [^ / some / path]) {return $ soapui_proxy- & gt; ($ env);} and {return $ live_proxy- ($ Env);}};   

Install it and run it as plackup filename . It creates two proxy apps, Which forwards all requests to the live service URL, and is the one who forwards all requests to your counterfeit service URL. The Cover app then selects the app to request any request based on the URL. To transmit (or based on something else, if required).

uinavigationbar - iOS - how to make subviews of a Navigation Bar transparent? -


I have encountered some problems in animating the alphabet of the authentication subview of my navigation bar. Here's the starting stages of the bar:

Enter image details here < P> How far is it here:

Enter image details here

The thing is that I need to make all this "star", "new" and second-round buttons transparent when the search is active (I have to reduce their alpha to zero) in the following ways of the representative Trying to make them transparent Class I:

  - (void) search. Search Bar - (Zero) SearchBarTextDidEndEditing: (UISearchBar *) searchBar - (Zero) Searchbar SearchButtons: (UISearchBar *) searchBar   

I do a lot of code in all of them:

  // Parents are the only indicator of a search representative, which is the parent.navigationController.navigationBar (UIView * someViewToFade). The subviews point to viewing the controller {if (someViewToFade.tag == 88 || someViewToFade.tag == 11) {NSLog ("Some Weve Towf.f. Alpha changes before =% F", some weave Tofed.Alpha); SomeViewToFade.alpha = 0.0; // 1.0, depending on the method}}   

However, I could not get the desired result as follows, although I am getting the right alpha value on that NSLog, the button is not exactly Fade I'm probably doing wrong, have any suggestions on this?

1 Edit:

I think I should add some details of the scene hierarchy in my case. OK, I have UISegmentedConrol, which holds these round buttons and two UIImageViews, the background for the control containing the segment, and the triangle indicator. All these ideas are added to the navigation bar because it is a subview, besides a rectangular view, which keeps the searchbar, and later also added as a subview in the navigation bar, so it is the top view in the hierarchy. Apart from this, I am animating my search by animating the frame of my search (it expands or condenses, when the above phenomena are in the representative). I hope I have given all the necessary information.

It's been a while since I did iOS programming. It's possible that even though you're setting up an alpha, but do not trigger a recruiter [UIView setNeedsDisplay] can help refresh the drawing in the next drawing cycle.

For a reference:

sql - trying to sum allocation percentages -


After

I'm a newbie with SQL and with little training it has been thrown in, so appreciate the very simple answer are doing! I am trying to draw a query on the allocation of participants but I need all the allocation for a fun expression. I currently select the following:

  select external_plan, participant_tax_id, external_vehicle, sum ( Money_type from decimal (alloc_rate, 15,2)), trc.vst_partalloc where external_plan = 'RF00580' and money_type = '101' alloc_rate, external_plan, participant_tax_id, external_vehicle, group by money_type   

this The following example presents:

  EXTERNAL_PLAN pARTICIPANT_TAX_ID eXTERNAL_VEHICLE alloc_Rate MONEY_TYPE RF00580 #### ##### DFC X 0.03 101 RF 00580 ################## ACRNX 0.06 101 RF 00580 ######### STSVX 0.06 101 RF 00580 ######### VISGX 0.06 101 RF 00580 # # # ###### VMViX0.0601 RF00580 #########Regx 0.0901 RF00580########DODGX 0.12 101 RF00580########DRLCX 0.12 101 RF 00580 ######### ABNK 0.20 101 RF 00580 ######## PTTRX 0.20 101   

Then ###### ### One of the participants in these rows represents, alloc rates say up to 100, what I need is a line e Xternal_vehicle but not returning from the summ display is written from 100 to alloc_rate - does this make sense? Thanks in advance for any help, thanks!

All you have to do is remove it from the need to look like External_vehicle and select the group by section.

vb.net - TaskDialogStandardIcon not working on task dialog -


I am creating a work dialog in vb.net and the icon is not coming. (Everything else works) I am using Microsoft.WindowsAPICodePack.Dialogs is under my code: Low commandLink_Send = New TaskDialogCommandLink ("btnShowAlternatives", "View Alternative Times", " Select an available time ") slow commandLink_Ignore = new TaskDialogCommandLink (" buttonIgnore "," go back "" booking form ") ** td.Icon = TaskDialogStandardIcon.Shield ** td.Caption =" application error "td.InstructionText = "Booking Conflict" has been found in a conflict in the application "td.Text =" one of the selected resources "td.Cancelable = False td.Controls.Add (command Link_Send) td.Controls.Add (commandLink_Ignore) AddHandler command Link_Send.Click, AddressOff eventHandlers.commandLink_send_click AddHandler command link_Ignore.Click, AddressOf eventHandlers.commandLink_ignore_click

I'm doing something wrong

Cheers

At the moment, there are only 1 solution for this. You have to set it with the opened event call. Something like this:

  AddHandler yourTTD.opened, AddressOf yourTTD_Opened   

and add something like this:

  private Shared sub yourTTD_Opened (ByVal as the object, as byVal e System.EventArgs) yourTD.icon = TaskDialogStandardIcon.Shield 'and you could also wish you' yourTD.FooterIcon = TaskDialogStandardIcon.whichevericonyouwant End Sub   

cheers

html - Fixing a child div within its parent regardless of overflow -


I am trying to sit a child div on the bottom of my parent div relative to "div window"; That is, I want the child to be fixed in the lower part of the Div or whether the user should scroll.

When there is no content overflow, then I am able to accomplish this goal:

HTML:

    

CSS:

  #outer {status: relative; Overflow-y: scroll up; Red color; } #default {down: 0; Status: Completed; color blue; }   

The result is:

image with <Code> #outer </ code> Overflow and user scroll contents: </ p> <p> <img src =

.

I have a problem in this: let me call #inner (blue box) to #mount ( Red box) should be fixed in the lower part - by any means on the scroll - position: fixed to use an effect in that div height: 100% . But I want to achieve the effect using a div which has a set height which is not 100%.

I think this is a very easy solution, but I It can not be understood.

If you have a second outter and

gt; Then you have been statically depicted that element #outter div:

Alternatively, you can scrolling & lt; Div & gt; Instead of , the code> position: sticky :

but I do not know what type of browser support you will get.

hadoop - Impala on Cloudera CDH "Could not create logging file: Permission denied" -


I installed Impala via parcel in Cloudera Manager 4.5 on a CDH 4.2.0-1.cdh4.2.0.p0 is. 10 cluster.

When I try to start the service, it fails on all the nodes with this message.

  perl -pi -e 's # {{CMF_CONF_DIR} } #club / claudera-ckm-agent / process / 800-ipala-impalad # g '/ run / clodera-scm-agent / process / 800-ipala-implead / ipala-conf / ipald_flag' ['exclamation = extlad]] 'Ajl /opt/cloudera/parcels/IMPALA-0.6-1.p0.109/lib/impala/../../bin/impalad --flagfile = / run / cloudera-scm-agent / process / 800-impala Could not create the IMPALAD / Impala-conf / impalad_flags logging file: Permission denied Can not make any LOGGINGFILE 20130326-204959.15015 accepted! Log4j: Error Setfile (empty, true) Call failed Java.io.FileNotFoundException: /var/log/impalad/impalad.INFO (Permission denied) java.io.FileOutputStream.openAppend at (Basic method) ... at org.apache .comons.logging.LogFactory.getLog (LogFactory. Java: 685) on org.apache.hadoop.fs.FileSystem & lt; Clinit & gt; (FileSystem.java:92) + date   

I am unsure whether the permission issue is not being impaired or something else is crashing and permission problem Comes right now because the crash log can not be written.

Any help would be great!

Run from debug binaries as described here:

Related to kernel 12.04.1 in JVM in LTS

Basic Answer:

java - ClassCastException using Class.cast using Generics -


I am writing a general method that will validate an asset by trying class.cast on it, but I'm a classmate I'm getting the exception

... class test

  public & lt; T & gt; T received (attribute P, string prope, class and lieutenant; t & gt; clauses) throws the exception {t = null; Object Propulsion = P. Jet (prokai); If throwing new exception ("property" ("property +" + "") is zero);} {val = clazz.cast (try); // marker} hold (exception e) {new exception ("+ Property +") is the invalid value of the value type ("+ clazz +"); e);} Returning Vals;}   

... test class < /p>

  @public blank set up () {proput = new PropUtil (); Properties = new property (); properties.setProperty ("test.int.prop", "3");} @ Test Public Null Test (GET) {try (new integer (3), propUtil.get (properties, "test.int.prop", Integer.class));} (Exception e) {System.out.println (e);}}   

The code commented on MARKER is causing class class exception.

Any thoughts were highly appreciated.

properties class one hashtable Store is string objects, especially when you call setProperty . You have added string "3", the integer 3 No You are trying to effectively insert "3" in the form of a integer , so try to correctly thrash a ClassCastException

  assertEquals ("3", propUtil.get (properties, "test.int.prop", String.class));   

Or if you want to get a integer back to an integer , then just a Use to .

ellipses collisions in vb.net? -


I have some problems in my game. In fact I had to find out the ellipse-oval collision, I would prefer the code As Vb.net language, I can not understand any other help with ideas or codes?

You only investigate conflict with object and area can do. New Drawing2D.GraphicsPath () gp1.AddEllipse (Rect1) as Dim Gp2 New Drawing2D.GraphicsPath () gp2.AddEllipse (rect2) as the intrinsic method:

  dim gp1 ) Dim reg1 as new area (gp1) dim reg2 as new area (gp2) reg1.inset (reg2) reg1.GetRegionScans (New Drawing2D.Matrix (1, 1, 0, 1, 1, 0)). Length & gt; 0 message << code>    and  rect1   rectangle << code>    / code> S which defines the oval (like), like when you draw the oval with a rectangle:   A new rectangle like dim rect 1 is (5, 5, 150, 100) m. Credigraphics You can use a better game engine for performance and options.               


  • Update sql in perl script - execute statement stuck -


    Something is going wrong in the execute statement. It always seems to hang for when I run it in the command prompt. It does not die either, what parameter might be required?

      #! Use / usr / bin / perl DBI; Use data: Dumper; $ Dbh = dbi- & gt; Connect ('db', 'NAME', 'PASS', {LongReadLen => 1000000}) or 'Error: Can not connect to DB'; $ St = "Update table set the_id = 7 where middle = 23 and tid = 22"; My $ UpdateRecord = $ dbh- & gt; Ready ($ st) or die "The statement could not be prepared: $ st". $ Dbh- & gt; Errstr; $ UpdateRecord- & gt; Execute () or die "$ UpdateRecord can not execute". $ Dbh- & gt; Errstr; $ UpdateRecord- & gt; Finish; $ Dbh- & gt; Disconnect (); Edit: 
    I tried to use bind_param () with a compulsive effort, and it is still hanging.

    You need ready instead of My $ updated record = $ dbh- & gt; ($ St) or die "Details failed: $ st". $ Dbh- & gt; Errstr;

    :

    This method is generally useful for non-selection statements that can not be prepared in advance (driver's limit) Reason) or need not be executed repeatedly should not be selected for SELECT statement because it does not return a statement (so you can not bring any data).

    In addition to this, always add the DB driver module / you are using, Use DBI at the top after the statement.

    Use DBD :: Oracle ;

    Apart from this

    Strict use; Use of warning;

    javascript - Copy field value from one field to another -


    I need to copy two field values ​​from two different areas to their respective fields on the same page in another form. is. / P>

    Input Field: First Name Input Field: Last Name

    Copy these values ​​to these:

    Input Field: Billing First Name Input Field: Shipping First Name < / P>

    I have tried the following code to do no avail, I've hacked it from another website that has a checkbox for the same thing, in my case, the customer's first name, the last Name and email, one to enter the customer Clicks on Form Continue button again, and loads the next form, it would form where I want to first / last name autocomplete as early as.

    This is the code that I am in the document.

      & lt; Script type = "text / javascript" & gt; Function Fill Billing (F) {if (f.dispatch [checkout.update_steps] .submit == true) {f.user_data [firstname] .value = f.user_data [b_firstname] .value; F.user_data [lastname] .value = f.user_data [b_lastname]. value; }} & Lt; / Script & gt;   

    fields are generated in the form of default, unfortunately I can not change the ID nor the name value.

    First name:

      & lt; Input type = "text" class = "input-text" value = "" size = "32" name = "user_data [first name]" id = "elm_6" & gt;   text = "User_data [lastname]" id = "elm_7" & gt;   

    Continue button:

      & lt; Input type = "submit" value = "continue" name = "send [checkout.update_steps]" & gt;   

    Billing First Name:

      & lt; Input type = "text" class = "input-text" value = "" size = "32" name = "user_data [b_firstname]" id = "elm_14" & gt;   

    Billing last name:

      & lt; Input type = "text" class = "input-text" value = "" size = "32" name = "user_data [s_firstname]" id = "elm_16" & gt;   

    I think, but may be wrong, because in the submit button there is a name in which dot (dispatch [checkout.update_steps]), it breaks javascript, but I Not sure

    I have also noticed that the "first name", "last name" field and "continue" button are on a different form, data is sent through Ajax on another form on the same page is . In the first name, name = "step_one_contact_information_form" and the second form (the billing first name, billing last name) has the name = "step_two_billing_address".

    Any thoughts?

    Thank you for your advice!

    I recommend that you make it with jQuery. It is very easy I made it for you :

    Here is an example of code:

      $ ('input [type = submit]'). Val ($ ('# elm_14'). Val ($ ('# elm_6'). Val ()); $ ('# elm_16') Val ($ ('# elm_7'). Val ());}) ;    

    Rearrange XML nodes with PHP -


    I have a dynamic banner with images / information saved in XML file. I'm adding an option to rearrange the images to the user, though they like (Jquio Sortable) and once I get a new order (which indicates the ID attribute) I copy the infos of each node and Want to rearrange without saving it again in the new order, for example:

      & lt; Banner & gt; & Lt; Banner id = "1001" & gt; & Lt; Infos ... & gt; & Lt; / Banner & gt; & Lt; Banner id = "1003" & gt; & Lt; Infos ... & gt; & Lt; / Banner & gt; & Lt; Banner ID = "900" & gt; & Lt; Infos ... & gt; & Lt; / Banner & gt; & Lt; / Banner & gt;   

    Ask the user to rearrange it at 900, 1003, 1001. I would like to be able to obtain nodes by ID # and accordingly restore them. Is there an easy way to do this?

    (1) a child order every and lt; Banner & gt; - Node and (2) Sort the xml by that child.

    (1): $ xml Simplexml object, in order $ order ...

      $ Stored in order = array (900,1001,1003); Foreign currency ($ xml-> $ banner as banner) {foreach ($ k = & gt; $ order as $ v) if ($ banner ['id'] == $ v) $ banner- & Gt; Add Chalk ('Order', $ T); }   

    (2): Sort by order xml: View accepted responses in this post:

    View live-demo @

    google maps - Untouched Website Since September -- Now Throws INDEX_SIZE_ERROR DOM Exception 1 -


    A Google Map is shown with the average of about 20-30 markers and polylinelets on my website, all markers and polyline each Using javascript timer, updates every few seconds, which calls in some ASP.NET codes to get new coordinates for all markers.

    This website used to work entirely in September when it was created and demo. It was left for days at a time, at the end of the month, the website was installed on the shelf and is no longer used.

    A new demo just got up, so I opened the website 6 months later this week. The website now attracts some polylines, and some markers, but almost none of them are

    My server and code are not completely changing, so it feels like a Google Maps API problem.

    Is there any ideas for what has happened to anyone?

    A pair of Google Maps APIs has been updated since last September.



    Preferred method for AES Encryption and Decryption in Java -


    I have written the following two methods that encrypt and decrypt a given token:
      private static final string ALGORITHM_TYPE = "AES"; Private static final string CIPHER_TRANSFORMATION = "AES / CBC / PKCS 5 Padding"; Private static byte [] INITIALIZATION_VECTOR = new byte [] {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; Public string encryption (string token) {cipher cipher = null; Secret key = null; String tokenAshx = faucet; Byte [] encrypted token = faucet; Byte [] sksKey = getKeyAsByteArray (key); // Try the SecretKeySpec key {key = new secretive speak (scusk, algorithm_type); Algorithmparameterspap parasap = new IVPAMMPAC (initial size_aveter); Cipher = cipher Get Instances (CIPHRHRRAAFA); Cipher It (cipher NCRIPTMODEG, key, absolutecpeque); EncryptedToken = Cipher.DoPhinal (base64.xcodebus64 (token.getbits ("UTF-8")); } Hold (exception e) {new encryption exception (e); } Return Base64.encodeBase64String (encrypted token) .toLowerCase (); } Public string decrypt (string token) throws encryption expeditions {cipher cipher = faucet; Secret key = null; Byte [] decrypted token = faucet; Byte [] sksKey = getKeyAsByteArray (key); // Try the SecretKeySpec key {key = new secretive speak (scusk, algorithm_type); Algorithmparameterspap parasap = new IVPAMMPAC (initial size_aveter); Cipher = cipher Gate instances (CIPHRHRRAFFAF); Cipher It (cipher DECRAPTMODEG, key, absolutecpeque); DecryptedToken = cipher.dominal (base 64.decodeBase64 (token)); } Hold (exception e) {new encryption exception (e); } If (decryptedToken == null) {Removal of new encryption result ("Unable to decrypt the following token:" + token); } Return Base64.encodeBase64String (DecryptedToken); }   

    However, I am unable to decrypt any encrypted strings successfully with the encrypt method. I discovered similar issues and found the closest here:. Even after using the same strategy, I'm still unable to decrypt the encrypted string.

    In addition, I am encoding encrypted / decrypted byte array using Base64 instead of creating a new string in the form of the second result in an unsafe URL string. You are encrypting base 64-encoding, and then re-base-64-encoding, and decrying base 64-decoding, and then for some reason the base 64-encoding does not make sense You must be:

    1. Encryption base64-encoding, i.e. essentially return Base64.encode (cipher.doFinal (...))
    2. (1) To decrypt the base 64-decoding, that is basically the return cipher.domain (base 64.decode (...)) < / Html>

    windows runtime - WinRT XAML Toolkit BindableSelections not updating UI -


    The XAML to deal with the selected item in my gridview and C # code.

    I'm also using MVVM Light and everything is working, including being able to see what's selectedItems inside of me.

    However, when I reflect changes made in SelectedItems clear attempt to, does not seem to me UI update / SelectedItems.

    I WinRT XAML Toolkit (), which is using a GridView on

    XAML

      & lt BindableSelection extension I am; Control: CustomGridView x: Name = "VideoItemGridView" Grid.Row = "2" margin = "0, -3,0,0" padding = "116,0,40,46" HorizontalContentAlignment = "muscle" VerticalContentAlignment = "Stretch" IsItemClickEnabled = "right" SelectionMode = "extended" extension: GridViewExtensions.BindableSelection = "{SelectedVideoItems binding mode = TwoWay}" ItemsSource = "{binding source = {StaticResource ViewSource}}" ItemTemplate = "{StaticResource VideoItemTemplate}" & gt; & Lt; GridView.ItemsPanel & gt; & Lt; ItemsPanelTemplate & gt; & Lt; Variable Sized Veragrid Madwidth = "250" Item Hight = "160" /> & Lt; / ItemsPanelTemplate & gt; & Lt; /GridView.ItemsPanel> & Lt; / Control: CustomGridView & gt;   

    MyViewViewModel.cs

      #region selected items /// & lt; Summary & gt; /// sets or sets the selected video item. /// & lt; / Summary & gt; Public supervision & lt; Object & gt; Retrieve {Vote {Select it}. Selected videos; } Set {this._selectedVideoItems = value; This .set ("Selected VideoWimes", in this context. Selection- VIDEOItems, Value); }} Private observable collection & lt; Object & gt; _selectedVideoItems = New Observation Collection & lt; Object & gt; (); #endregion #region Click the application bar command /// & lt; Summary & gt; Click on /// ClearSelection to get the command. /// & lt; / Summary & gt; Public ICommand ClearSelectionClickCommand {get new relayCommand ((=) => This Clare Selection Operation ()); }} /// & lt; Summary & gt; /// Select All Command Operation. /// & lt; / Summary & gt; Private Wide Clear Collection selection () {This. SelectiveVideoNew = New Observation Collection & lt; Object & gt; (); } #endregion    

    Clear your selected items in ClearSelectionOperation By calling

      this.selected video id.Clear (); Instead of   

      this.selected video item = new Observe Collection & lt; Object & gt; ();   

    If that does not help to investigate the problem solving.

    Java split() checking if index equals a value -


    I have a function that gets passed in the string I

      string [] The strings are split with info = s.split ("\\ s +");   

    I want to see that the first index is plus sign (+). If I enter in a string: + Other stuff claims that +! {+++> "info = 0 ++ +" = ""); if (info [0] == "+") {System.out .println ("yes");} Else System.out.println ("no");

    This is the output I received:

      Interp & Anybody know why this is?   

    < When comparing code> string s, always use String.equals (string str) . == Comparison of wire for equal memory recognition, String.equals () will compare for similar content.

    if (info [0] Equals ("+") {Do stuff ..}

    linux - How to make dlerror() report *all* unresolved symbols from dlopen() failure to load shared library? -


    I try to report all unsuccessful symbols to a shared library on a failed call by reporting to Dlpann () I am here. I have tried both RTLD_LAZY and RTLD_NOW as the flag for the delplay call. I know that 10 missing symbols in the shared library (i.e. if you have blasted a static link G +: link 10 will fail from missing symbols). I have to get a DelRar (), to tell me about all the 10 missing symbols during the failed load.

    Does anyone know how this is happening? I have been seen from the man page that the dealer () returns the final error; So maybe I'm asking too much but I wonder if someone knows.

    Thank you very much,

    Can the loader report the error as soon as it shows that the library can not be loaded (as soon as it searches for the first missing symbol) the loader does not have any meaning And it's not so.

    However, you can simulate using ldd -r by using LD_PRELOAD and LD_TRACE_LOADED_OBJECTS Example:

     Include  $ cat main.c # & lt; Dlfcn.h & gt; # Include & lt; Stdio.h & gt; Int main () {void * p = dlopen (". / Foo.so", RTLD_NOW); If (p == NULL) {printf ("% s \ n", dealer ()); Return 1; } Return 0; } $ Cat foo.c int bar (), falcon (); // is not defined anywhere foo () {return bar () + baz (); } $ Gcc main.c -ldl; GCC-FPIC-SHARE -OU FU.SU FUO. Co .. / AA.T. / FOSO: Undefined Symbol: Falcon # Only the first symbol is reported in $ ldd -r ./a.out linux-vdso.so .1 = & gt; (0x00007fff52ddc000) libdl.so.2 = & gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f158e48d000) libc.so.6 = & gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f158e0ce000) /lib64/ld-linux-x86-64.so.2 (0x00007f158e6b2000)   

    This does not work , Because your program was not executed, and thus never loaded foo.so . But for the rescue LD_PRELOAD :

      $ LD_BIND_NOW = 1 LD_WARN = 1 LD_TRACE_LOADED_OBJECTS = 1 LD_PRELOAD =. / Foo.so./a.out linux-vdso.so1 = & gt; (0x00007fff3c1b6000) ./foo.so (0x00007ffd33212000) libdl.so.2 = & gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffd3300e000) libc.so.6 = & gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffd32c4f000) /lib64/ld-linux-x86-64.so.2 (0x00007ffd33414000) Undefined Symbol: Falcon (./foo.so) Undefined Icons: Bar ( ./foo.so)   

    WILE: Now all unresolved symbols have been reported.

    assembly - Push/Pop vs Mov in MASM -


    is a simple question but I do not know the answer.

    The reason for this is:

      push wParam pop char   

    Where wParam is the type of WPARAM type Is defined in form and char is defined as the type WPARAM.

    Why can not I just do it

      mov char, wParam   

    I think what to do with this address, but I can not justify it. When I try to use the mov statement, MASM excludes a non-discript error.

    Because both are memory addresses and in x86 assembly mov mem, mem ( There is no such instruction as mov char, wParam in this case).

    So, to do this, you should press push & amp; Move the value into some register with pop , or before mov reg, mem and from that register to mov mem, reg .

    java - Overriding Methods -


    I need help with his problem I can not find anything on this subject (I'm probably looking for the wrong thing) < Define a sub-section called / p>

    C which overrides the method m1 () , so that it returns the difference between the meter and the N.

      public class C {Private int m; Private int n Public C (int mIn, int nIn) {m = mIn; N = nIn; } Public Ent M1 () {Return M + N; }}    

    First, m and N should be protected , not private ( protected is default). Then do something like this:

      Expansion of public square b C {public int m1 () {return m - n; }}    

    javascript - Large shared code base, extend functionality -


    We are using the MVC app folder in all our sites through an SVN: External, and each site also has its files Settings files are specific to the site.

    We require the system to have different functionality for each site. The main functionality should remain the same

    Currently the options we consider are:

    a: embedding feature condition in core

    C: a controller file Turn on / off features on / off

    b: Obtain override / existing controllers

    c: Implement a modular system (plugins) with unlimited hooks within the core Make and Configure

    Option B Already Exabled Has, however, to maintain long-term problems of difficulty, and it is quite hack.

    Option B is already implemented, but it is difficult to maintain (as we have a new feature, we have to edit the files of each site, if it is overwritten

    Option c is a solution that we have tried to fix recently and has thought of fixing it by editing a shared control plugin and a site-specific settings file. / P>

    It is good to know If someone has any experience with any option that we have already thought, then if any other option knows which will be a better fit.

    Option

    Large scale application will benefit greatly by following modular patterns, you will loose your code for better maintenance in the future. Can decode in a manner that allows many developers to have different pieces at a time You can work and load your specific modules and addons through the site specific settings file.

    I recommend you check Edi Osmani's article on the subject of large scale applications: / P>

    • The moderator, mask, pub / sub patter works very well with modular components, and whatever Modules are like loaders, so you have a good foundation on a large scale applicationI used it on the job and it's a great way to keep everything organized and easy to maintain.

    How do I access a configuration variable passed into grails from the commandline -


    I am trying to send a variable like the command line to my Geral app:

     < Code> grails -Dmy.build.number = 33 prod war root.war   

    I tried to access it as a grailsApplication.config.my.build.number But I get an empty map. It seems weird that the variable is defined, but what I send is not set.

    How do I get a command-line property?

    I plan to install some of my assets (CSS, JS, image etc.) to work as a CDN in CloudFront. So in my construction phase I want to use the build number as the cash buster and want to set my property to point to mycloudfronturl / assets / $ {buildnumber} /script.js . If there is a better attitude, then I am also open for this.

      system getProperty ("my.build.number");    

    ruby - Wrapping a block in method calls that accept blocks by name -


    I have a number of methods that I call like this:

      with_this Do with_that and end_in_hists_context yield end date   

    I remember that there was a trick to wrap one such block call again. How can I write a method that makes the block wrapping for me?

      def in_nested_contexts (& amp; blk) references = [: with_this, with_that ,: and_in_this_context] #Window may end in injection    

    you can actually inject nested lambdass or procs, which you can finally call you The block requires a nesting interior, so you reverse your array and use that block as the starting value, then the result of each In the Fislkar Wrap:

      def in_nested_contexts (& Amp; blk) [: with_this ,: with_that, myself_END_STRONG_TAG_ in_this_context] .reverse.inject (blk) {| Block, symbol | - & gt; Send a symbol, & amp; Block}} .col   

    If you wrap your with_this , then enter before and after statement, you can see it in action:

      in_nested_contexts {puts "hello, world"} # = & gt; Start with start_that start with start_this begin hello, world reference end with_that end with_this    

    java - Creating a backtype.storm.tuple.Tuple for testing purposes? -


    I am new and am trying to work on how to write a bolt test that is executed by the execute (Tuple) Tupal) Method in a subclassed BaseRichBolt .

    The problem is that it seems that Tupal is unchanging and I do not see any way or builders to create a new tool for my own Tupal < / Code> How can I create, or how can I test a bolt with test input?

    I'm actually using Scala, not Java, but the answer should be easily translatable.

    Tapping the object of the taple object. This is straightforward:

      package storm.starter.tools; Import static org.mockito.Mockito.mock; Static org.mokito import. Mokito when; Import backtype.storm.Constants; Import backtype.storm.tuple.Tuple; Public Finale Class Mocktauplahlper {Private Mock Tüpelhalper () {} Public Static Tupal MockTeak Tupal () {Return Mock Tuplal (constantSETExamComoniumID, static.SETMTHERCRAAM_ID); } Public Static Tuplicate Copy (String Component ID, String Stream Id) {Tupal Tupl = Mock (Tupal Class); . When (tuple.getSourceComponent ()) thenReturn (ComponentID); . When (tuple.getSourceStreamId ()) thenReturn (streamId); Returning tuple; }}    

    ruby on rails - Invalid Operation Error when rvmsudo apt-get on ubuntu 12.04.1 -


    We are using rvm 1.19.0 so that the passenger for rail and libcurl4-openssl-dev I for NGN? Although there was an error, we recommend the following:

      $ export rvmsudo_secure_path = 1   

    Now another one of the unlawful operations as The error is: ubuntu @ $ rvmsudo apt-get libcurl4-openssl-dev e: illegal operation libcurl4-openssl-dev

    What's wrong with the RVM? is? Thanks for the help.

    rvmsudo apt-get install libcurl4-openssl-dev

    javascript - How To Replace jQuery 1.9.1's $.parseJSON function with the implementation from jQuery 1.8.3 -


    jQuery has changed it into version 1.9.0 in the implementation of $ .parseJSON and we really do JQuery is dependent on previous versions of Perce blank and empty strings, eg JQuery will not throttle an exception and will return a blank value to the faucet and empty string.

    We want to use the latest version of jQuery, which is 1.9.1 at the time of writing, but the implementation of $ .parseJSON.

    Documentation that explains changes with jQuery:

    Is there a javascript that we can use it to tell jQuery instead of the "natural" version of the $ .parseJSON function. With the same name as the second implementation / function ... from jQuery 1.8.3 version?

    The implementation of the function is required.

    If you want to, do this:

      jQuery._parseJSON = JQuery.parseJSON; JQuery.parseJSON = Function (data) {if (! Data = data type! == "string") {return tap; } Return jQuery._parseJSON (data); }    

    c - Difference in variable value inside and outside a function -


    I wrote a program in which I found the area of ​​the cylinder with the function area returns type and parameters Without it. Answer was returned to the main function. However, I get different output in the main and found a different output in the field . The decimal code is being replaced by 0 in the main function. Why is it like this? Enter image details here

    from float

    jquery - Need a Javascript URL Regex -


    इस सवाल का पहले से ही एक उत्तर है: < / P>

    • 73 उत्तर

      अगर कोई मदद कर सकता है एक regex बनाने के साथ बाहर ..

      असल में, एक आइफ्रेम के स्रोत ले, और अगर यह SoundCloud से है देखने। यदि ऐसा है, तो इसके आईडी वापस करें उदाहरण के लिए:

        var src = 'http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F85110490&auto_play= झूठी & amp; show_playcount = false & amp; show_user = false & amp; show_comments = false & amp; amp; खरीद = false & amp; पसंद = false & amp; बंटवारे = false & amp; show_artwork = false & amp; रंग = 00e7ff '; समारोह soundcloudId (src) {var p = / ___________ /; वापसी (एसआरसी। मीच (पी))? RegExp। $ 1: गलत; } SoundcloudId (src);   

      और इसके परिणामस्वरूप, यह "रेगएक्स" के माध्यम से "src" चलाएगा, और यदि कोई ध्वनि-लिंक लिंक, 85110490 वापस करेगा। अन्यथा, गलत। < P>

      इस रीज x कोशिश करें:

        / http: \ / \ w.soundcloud \ .com \ / *% 2Ftracks% 2F ([0- 9 ए-एफ] +) /   

      रननाबल उदाहरण:

    php - array_diff does not show the difference -


    I am trying to compare two arrays using this code:

      $ Diff = array_diff ($ selected, $ checkbox); Echo '& lt; Br> Selected:'; Print_r ($ selected); Echo & lt; Br> Original: '; Print_r ($ check box); Echo & lt; Br> Difference: '; Print_r ($ difference);   

    This is strange, though it is the result of the following:

      selected: Array ([0] = & gt; Forums 1 [1] = & Gt; Forum 3 [2] => Furniture) Origin: Array ([0] => Forums 1 [1] => 3 [2] => Forum 4 [3] = & Gt; Furniture [4] = & Nt; Nieuwforum Difference: Array ([0] = & gt; Forum 1 [1] => Forum 3 [2] => Furniture)   

    It seems that the array_diff function only copies the 'selected' color. I have tried many things, where are posted in the same question like using array_IDIF_soc Received, but it does not matter.

    Does anyone know what is wrong?

    is mentioned as.

    Returns an array containing all entries from array1 which is not present in any other array

      $ diff = array_diff ($ Checkbox, selected $);   



    windows - Change JDK to another version issue -


    I have started on a project which specifically says that use 1.6 JDK to stop the form When I try, change JDK from 1.7 to 1.6.

    Although I changed the environment variable from 1.7 to 1.6 JDK version, when I entered java.exe -version or java -version in CMD , it still returns the first version but when I run the javac -version , it gives version 1.6.

    I have done so far,

    In the user environment variable,

    • set the path to c: \ program files \ java \ jdk1 .6.0_43 (JDK installation path)
    • Added path to java_home variable and c: \ program files \ java \ jdk1.6.0_43 (JDK installation path )
    • Change the path of C: \ Program Files \ Java \ jdk1.6.0_43 \ bin (Java Bin)

      System environment variables In,

      • Added C: \ Program Files \ Java \ jdk1.6.0_43 \ Bin to CLASSPATH
      • Created JAVA_HOME variable and added C: \ program files \ java \ jdk1.6.0_43 \ bin

        There is a variable that is related to Java, which is called QLJAVA and Path C: \ Program Files (x86) \ Java \ jre7 \ lib \ ext \ QTJava .zip was set to and I also removed that variable. ago I edited CLASSPATH This is the same path that was there

        My problems ,

        1. Why is 1.7 selected when using Java-version, and why do different results when running javac -version ? Or is there something wrong with what I've already done?
        2. QLJAVA variables and how it is used and how the system variable is finished.

        3. Why there is no backup compatibility to convert to 1.6.

          Java AVIIM should point to the Java installation path / path in the % JAVA_HOME% / bin

          I usually set different Java versions as separate environment variables and JAVA_HOME < / Code>

          For example

            JAVA_6 = c: \ jdk6 JAVA_7 = c: \ jdk7 JAVA_HOME =% JAVA_6% (or JAVA_HOME =% JAVA_7%) path = Besides, some other entries in the path can point to any other version of Java, so I usually call % JAVA_ HOME% \ bin  connects the entry for the first time.  

          In addition, when you change the environment variable, you have to close and open a new CMD charge to reload the environment variable.

          Finally, having an empty space on your way can have an effect. You may need to add quotation for them or use the old convertible conference in DOS. like. Program ~ 1 instead of program files

          to respond to your issues.

          1. Set your path environment variable digits and password only for the different paths for Java as the first entry in the PATH variable % JAVA_HOME% \ bin And it should choose the correct version of Java.

          2. For QTJAVA, I have not been able to do so so I can not give a solid answer. How did he get there, okay, while installing some software / programs, then they got there that way to modify the environment variables

          3. It should be backward compatible or try to do it. I have not seen the code nor have actually tried the JDK 7 quite late but given the link (given to you), according to this issue, it looks like a JDK 7 issue.

            Hope this helps.

    The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value in SQL Server 2005 -


    मैंने एक दृश्य लिखा है जिसमें तालिका से दिनांक जो

      रूपान्तरित किया गया है Varchar, date, 103)   

    और DATE1 के रूप में उपनाम लिया और फिर मैंने निम्नानुसार क्वेरी लिखी है:

      DATE_ तिथि से दिनांक 1 अक्टूबर का चयन करें WHERE MONTH (DATE1) = '12'   

    मैं महीने के साथ केवल विशिष्ट रिकॉर्ड प्राप्त करना चाहता हूं = 'दिसम्बर' जो 12 है

    मुझे एक त्रुटि मिली:

    एक डेरेटेड डेटा प्रकार के लिए एक चार डेटा प्रकार के रूपांतरण का परिणाम आउट-ऑफ-रेंज डेटटाइम मूल्य के रूप में हुआ।

    यह एसक्यूएल सर्वर 2005 में है pls मेरी मदद

    के रूप में डेविड ने सुझाव दिया है, आपको डेस्टटाइम कॉलम पर वापस स्ट्रिंग में कनवर्ट करने की बजाय दिनांक कॉलम का उपयोग करना चाहिए।

    हालांकि जब आप उसे डेट टाइम पर वापस बदलते हैं, तो आपको

     < कोड> तिथि 1 तिथि का चयन करें_डेमो कहां महीना (कनवर्ट करें (दिनांक समय, DATE1,103)) = '12'   

    इसके अलावा आपको वक्रार डेटा प्रकार की लंबाई निर्दिष्ट करने की आवश्यकता है इस लेख को पढ़ें

    ruby - What's the difference between Module.fun and fun? -


      मॉड्यूल MyMod def fun1 # ... end def MyMod.fun2 # ... end end   

    मज़ा 1 और MyMod.fun2 में क्या अंतर है?

    मज़ा 1 एक उदाहरण विधि है जो केवल तब ही पहुँचा जा सकता है जब कोई वर्ग उस परिभाषा के अंदर उस मॉड्यूल को शामिल करता है।

      p RUBY_VERSION मॉड्यूल MyMod def fun1 p "hi" end def MyMod.fun2 p "hello" end end class Foo MyMod MyMod.instance_methods (false) p MyMod.public_class_method ("fun2")   

    आउटपुट:

    पूर्व> "2.0.0" "नमस्ते" "हैलो" [: मजेदार 1] MyMod

    How to set breakpoint at all bookmarked locations in Visual Studio? -


    If we can search for a keyword, and set breakpoints on all search result lines, then it will be very useful.

    Is it possible in Visual Studio, without third party add-on priority?

    Menu under Edit - Find and Replace

     find and replace go

    Then under the debug menu - New breakpoint  breakpoint menu

    then correct  Add breakpoint

    jquery - toggle each div next to each link and fetch post data -


    मेरे पास मेरे शरीर खंड में निम्नलिखित HTML तत्व है:

      & lt; a class = "Tog" href = "#" & gt; मुझे क्लिक करें & lt; / a & gt; & Lt; div वर्ग = "परिणाम" & gt; यह एक कंटेनर डिवेल & lt; / div & gt; & Lt; br / & gt; & Lt; a वर्ग = "tog" href = "#" & gt; मुझे क्लिक करें & lt; / a & gt; & Lt; div वर्ग = "परिणाम" & gt; यह एक कंटेनर डिवेल & lt; / div & gt;   

    और सिर अनुभाग में यह शामिल है:

      .result {display: none; }   

    प्रत्येक लिंक & lt; a & gt; पर क्लिक करते हुए, अगला div टॉगल कर सकता है और मुझे क्या करना है उसी समय यह डेटा को किसी अन्य पृष्ठ से उस div में एक पोस्ट द्वारा प्राप्त करेगा। तो मेरा jQuery कोड है:

      $ (document) .ready (function () {$ ("। Tog")। क्लिक (function () {if (! $ (This) .next ("।") डेटा ('लोड')) {$ .post ("anotherpage.php", {id1: "value1"}, फ़ंक्शन (डेटा) {$ (this) .next ("परिणाम") डेटा ('लोडेड', सच है);})}} $ (यह) .next ("परिणाम")। स्लाइडटॉगल ("धीमा" ); विवरण झूठा है; }); });   

    प्रत्येक लिंक & lt; a & gt; प्रत्येक लिंक के बगल में ऊपर कोड द्वारा अच्छी तरह से टॉगलिंग कर रहा है लेकिन डेटा किसी अन्य पृष्ठ से नहीं ला रहा है अगर मैं उपरोक्त कोड के प्रत्येक बिंदु से $ (यह) .next को बाहर करता हूं:

      $ (दस्तावेज़) .ready (function () {$ (".gtg")। क्लिक करें ( फ़ंक्शन () (यदि (! $ ("। परिणाम")। डेटा ('लोड')) {$ .post ("anotherpage.php", {id1: "value1"}, फ़ंक्शन (डेटा) {$ (" ("परिणाम")। $ ("। परिणाम")। डेटा ('लोड', सच है);})} $ (यह) .next ("। परिणाम")। स्लाइड टॉगल ("धीमा"); विवरण झूठा है; }); });   

    प्रत्येक डिवेल प्रत्येक लिंक पर क्लिक करने और किसी अन्य पेज से पोस्ट डेटा प्राप्त करने के बाद टॉगलिंग कर रहा है, लेकिन किसी भी लिंक पर क्लिक करने से सभी div < / कोड> एक साथ एक ही समय में।

    मेरी क्वेरी यह है कि मैं कोड को कैसे संशोधित कर सकता हूं, ताकि प्रत्येक लिंक पर क्लिक करने से div उस लिंक के आगे टॉगल हो जाए और अगले div केवल

    मेरा मानना ​​है कि यहां समस्या यह है कि $ (this) < / कोड> एजेक्स-आवरण के भीतर खो जाता है तो आपको क्लिक फ़ंक्शन के भीतर मूल तत्व के संदर्भ को संग्रहित करने की आवश्यकता होगी, और सफलता फ़ंक्शन के भीतर कैशेड वस्तु को कॉल करें। < {Var $ this = $ (this); // कैश संदर्भ

    फिर बाद में ..

     }, फ़ंक्शन (डेटा) {// नोट हम $ $ (इस) $ this.next ("। परिणाम")। Html (डेटा); $ this.next ("। परिणाम") के बजाय, कैसे $ $ उपयोग करते हैं। डेटा ('लोड', सच है);    

    entity framework - UnitOfWork - IRepository - STE -


    I'm trying to collect a simple 3-level application as the following:

    1 - DAL (

    2 - BLL (context of DAL)

    3 - UI (reference of BLL)

    P > I read many articles, so I decided to implement a classic unitoffico-repository pattern, where those repositories are not aware of any self-tracking unit:

      Public Inter ISAPP & ATM; T & gt; {0} Attachment (T Entity) {...}   

    Question: If my component will run on winForm context, some UI control some units It can stick to the attribute, so the forward call method to edit the repository, such as (T Entity) will be worthless, my unit is already being tracked by internal object reference, obviously if I'm running on the web context I'm all working well because web pla Tform stateless is a simple trick after every Bielel operation can handle my object Kontetekset, but I want to use this solution. So I'm looking for a more beautiful solution to manage all cases.

    Is the IEPOTRETE ignoring anything about SEE? Can BLL be able to simulate a stateless environment for its own internal storage and / or disposal of units?

    If you are developing in WinForms, why do you want to simulate stateless platforms? Regarding the repositories and unit-effect patterns, look at those, which are strictly limited to EntityFramework. Forget about the reference in your UI layer, they are independent of the pattern ORM and are there, so you can easily change your DAL and check your application more efficiently.

    batch file - Auto supply user input ant exec task -


    I have an ant script that runs an interactive (which requires 2 user input). I have tried to use attributes 'input string' (between 2 inputs (between, and in between)) and 'input' (2 entries file)

    only the first input to exec function The batch file provided by the script waits for another input indefinitely

    Is there a way to provide multiple inputs through an action (or), for an interactive mode batch Inp Is there a DOS command to provide?

    Snippet 1: & lt; Exec dir = "F: / upgrade" executable = "cmd.exe" failonerror = "true" output = "upgrade.out" inputstring = "no & amp; amp; amp; amp; amp; Amp; amp; amp; amp; yes; & gt; & Lt; Arg row = "/ c upgrade process F: / script" /> & Lt; / Executive & gt;

    Snippet 2:

      & lt; Exec dir = "F: / upgrade" executable = "cmd.exe" failonerror = "true" output = "Upgrade.out" input = "upgrade.input" & gt; & Lt; Arg row = "/ c upgrade process F: / script" /> & Lt; / Executive & gt;   

    Input file content

      yes    

    This trick is to simulate the press of "Enter" in an input. The code for "ant" has many characters '\ n' character in its XML encoded form unit: & amp; ; # X0A; .

    So this should do the trick:

      & lt; Exec dir = "F: / upgrade" executable = "cmd.exe" failonerror = "true" output = "upgrade.out" input = string; & Gt; & Lt; Arg row = "/ c upgrade process F: / script" /> & Lt; / Executive & gt;    

    dom - How to obtain the "nodeValue" by python? -


    I am trying to parse some XML files like the following:

      & Lt; Foo .. & Lt; / M1> & Lt; Foo2 CHAR = "A" NUM = "8" TYPE = "beta" & gt; & Lt; Self-Examination Questions & gt; 12345 & lt; / SEQ> & Lt; Area seq_beg = "1" seq_end = "8" & gt; & Lt; Area seq_beg = "9" seq_end = "21" & gt; & Lt; REGION seq_beg = "22" seq_end = "32" & gt; & Lt; Area seq_beg = "33" seq_end = "44" & gt; & Lt; / Foo2 & gt;   

    I am able to use childNodes [x]

        

    and getElementsByTag ("SEQ") or getElementsByTag ("region") How do I get the value for I use text ">

    attributes ['xxx']. Value

    VBA Code - Extract email addresses Outlook -


    I got the code VBA code to remove email addresses from PST files. This is very useful because I can choose to remove addresses from folders. The code is being removed from the " to " area.

    I need this to remove from Message Body and " to " field.

    What should I change in the code?

      sub-extractEmail () Dim OlApp Outlook.Application Dim as the object name as Dimmobject set as the numeric dim FolderMAPIFolder set in the form of string retarded Ns OlApp = CreateObject (" Setup Namespace Setup Ns = ThisOutlookSession.Session 'Display Folder Folder Folder = NS.PickFolder' Set Text File Fs = CreateObject Set ("Scripting. FileSystemObject") Set a = fs. CreateTextFile ("c: \ email addresses.txt", is true) to read the email address from the mail item Par. In the folder for each mailbox. Item email = mailboxes Set up for A.WriteLine (email) OlApp = Set nothing Mailobject = None. Close End Sub   

    Thank you.

    You have mail item objects so use it to get the fields. Mailobject.Sender, Mailobject.SenderEmailAddress, Mailobject.SenderName and Mailobject.Body, Mailobject.HTMLBody or Mailobject.RTFBody A ???? Sorceri

    You are going to extract the value of the property, whcih a ";" A separate list of recipient names requires you to loop through each item in MailItem.Recipients.Collection.Collection and read the recipients for each recipient.Additional property A ???? Dmitry Strailechenko



    c# - Pull elements from array with property value under or over X -


    I have a very large list of custom classes. I often need to do an action based on only elements from that list where a custom value of the class is more than or less than a specific limit.

    Currently, I do something like this:

      // Organize a custom list with your X value (sometimes descending, sometimes descending) customList. Sort ((a, b) = & gt; bxcompareto (ax)); // unless the x value is not necessary (int i = 0; i   

    This is not a major hurdle, but it would be best if I can speed up this kind of work for this application (I do not always mention this way Want to learn)

    The question is whether it is a fast sorting method without writing yourself and / or a faster way to run PerformTask on elements that meet specific criteria without any movement is?

    My questions can also be asked about not only adding / removing items but also keeping a list organized, but changing them even when changing values ​​... < P> Thank you, Tim

    Sorting here is a wrong view of this (n log n) very efficient algorithms Where is the custom item in the custom item (n = & gt; nx> 0.5f)) {PerformTask (items). enumerable.where :

      foreach ); }    

    css - How to place Text and an Image next to each other in HTML? -


    I want to place the text and the image next to each other but I want the image to be on the screen on the left and I I want to move the text right on the right side of the screen. I currently have it ....

      & lt; Body & gt; & Lt; Img src = "website_art.png" height = "75" width = "235" /> & Lt; H3 & gt; & Lt; Font face = "wordana" & gt; The Art of Gaming & lt; / Font & gt; & Lt; / H3 & gt; & Lt; / Body & gt;   

    How can I do this?

    Thanks

      img {float: left; } H3 {float: true; }   

    Note that you might want to use style : whatever After the code provided by you, it does not slide directly under the contained elements.

    c# - MVC Post method not taking any information from get method?? -


    I have an extremely deceptive issue. I currently have the following code

      // Get the method, public actionResult EmailValidation (String Email, String Token) {EmailValidationViewModel Model = New EmailValidationViewModel (); Model.email = email; Model.token = Tokens; Member Current Members = Workflow. GetMemberByEmail (model.email, vendor.VendorID); If (existing member! = Null) {see return (); }} [HTTP} Public Action Result Email Validation (E-mail Validation View Model Model) {}   

    Now the above code, which I have already tested on a different page, in the model Loads the information to the post method itself I believe that there is a problem in my new view with the code given below, which prevents it from getting the information from the method it receives and sending it to the post method.

    I believe there is something with the following code in it?

      [[Form_Start]] & lt; Form action = "/ mobile / Home / EmailValidation" id = "email validation" method = "post" data-transition = "slideshow" & gt;   

    [[/ / Form_start]]

    If you can know why it gives viewers with data from the method obtained in a controller, but this next Please tell me, if you need more information, just tell me and I will try to provide as much code as possible. Thanks!

    this:

      if (existing member! = Null) { See Return (); }   

    Returning a view with a model.

    Change it to:

      if (current member! = Null) {return see (current member); }    

    gcc - Using fftw in c for harmonic analysis -


    So I have a periodic series and I need to get the highest number of the series without harmonic first.

    The size of the series is 360

    then I have

      f (0) = value1f (1) = value2 ... f (359) Somebody has suggested that to do this I want to do 360-point discrete fourier transfer DFT (F (0), F (1) ... F (35 9) ) - & gt; (F (0), F (1) ... F (35 9)) Then set F (0) and F (35 9) to 0, which will first remove the harmonic. After this I should change the 360-point inverse discrete Fourier to IDFT and then find the highest value in the result.  

    To do this, I'm using fft libraries in c but I'm having trouble trying to understand how to use them properly to do this. My periodic series is composed of real numbers, so I do not:

      #include "complex.h" #include "fftw.h" #include "rfftw.h" ... Fftw_real in_r [360]; // Actual number input 1d array fftw_complex out_c [360]; // 1d array of output complex numbers rfftwnd_plan p_DFT; // Plan for calculating DFT RFTWand_Plan p_iDFT; // iDFT p_DFT = rfftwnd_create_plan (1, 360, FFTW_REAL_TO_COMPLEX, FFTW_MEASURE) plan to calculate; P_iDFT = rfftwnd_create_plan (1, 360, FFTW_COMPLEX_TO_REAL, FFTW_MEASURE); Rffftwnd_one_real_to_complex (p_DFT, in_r, out_c); // I get an error in both of these calls: when incompatible type to assign to type, // "fftw_complexâ" type "complex double" type out_c [0] = 0.0+ 0.0 * _Complex_I; Out_c [35 9] = 0.0 + 0.0 * _Complex_I; rfftwnd_one_complex_to_real (p_iDFT, out_c, in_r); for (i = 0; i <360; i ++) max = fmaxf (in_r [ I], max);   

    I have many questions i

    How can I decide the first and last element of the output array by 0, It's complicated, but do not give me a complex number?

    Second, how am I doing this right? Or am I missing something?

    The third (this is the follow-up of what I need to do) is the dimension and phase of the first fourth harmonics Can I use FFTW libraries to get it? If so, how?

    Thanks for any help.

    Update:

    I changed

      #include "fftw    for #include" fftw3.h "  

    for

    P>

      #include "complex.h" #include "fftw3.h" #include "rfftw.h"   

    but I'm getting the same error

    Update 2:

    I am also getting errors like this /usr/include/fftw.h:307:13: Error: The one for the disputed type fftw_destroy_planâ Line

    due to fftw3.h included rfftw.h but if I remove rfftw.h I get such errors

      Error: unknown type name â ???? Fftw_real There is a conflict between fftw3.h and rfftw.h, but i can not remove rfftw.h because i can not use the required functions again.   

    Reference to:

      fftw_complex out_c [360]; // 1d array of output complex numbers ... // I get an error of both in this call: Incompatible type when assigned to type, // â "??? fftw_complexâ" by type "Complex double" ??? Out_c [0] = 0.0 + 0.0 * _Complex_I; Out_c [35 9] = 0.0 + 0.0 * _Complex_I;   

    Create this work in C99 mode on GMC (Option -std = c99 ) you need to include the header in the correct order:

      #include  #include Do & lt; fftw3.h & gt;   

    like fftw_complex It should be defined as a complex type.


    Otherwise it will be typedef double fftw_complex [2] , so the assignment goes like this: < Pre> out_c [0] [0] = 0.0; // real part out_c [0] [1] = 0.0; // imaginary part ...


    Please see if complex numbers are implemented.


    rfftw.h is obsolete with Fftw3:

    in FFTW 2 Complex and real one- and multi-dimensional changes for fftw_plan, fftwnd_plan, rfftw_plan, and different date for rfftwnd_plan Type was different, and each type was a "destruction of his own" ???? The ceremony In FFTW 3, all plans are fftw_plan type and everyone has been destroyed by fftw_destroy_plan (scheme).

    php, MySQL, fpdf and $_Get? -


    I have a search form in which the user exchanged the last name

    Then a There is a list of search results compared to MySQL tables and outputs (on a new PHP page).

    Then, in those results, I want to be able to use a specific one, which then outputs in a PDF, use fpdf.

    First page or form page code ...

      & lt; Select name = "metode" size = "1" & gt; & Lt; Option value = "lname" & gt; Last name & lt; / Option & gt; & Lt; Option value = "id" & gt; Id & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input type = "text" name = "search" size = "25" & gt; & Lt; Br> Find database: & lt; Input type = "submit" value = "go !!" Name = "go" & gt; & Lt; / P & gt; // Query Details Table starts with $ query = mysql_query ("SELECT SELECT * $ $ 'as' $% search%' LIMIT 0, 50");); While ($ info = mysql_fetch_array ($ query)) {echo '& lt; A href = "pdfout.php" & gt; . $ Info ['address'] '& Lt; / A & gt; '; Echo "& lt; br & gt;"; Echo $ info ['fname']; Echo "& amp; nbsp;" Echo $ info ['lname']; Echo "& lt; br & gt;"; Echo "& lt; br & gt;"; }? & Gt; On the   

    pdfout.php page, how can I remember the selected records (from the previous page) by the user?

    I have tried several $ _GET statements but it can not seem to work or do you need to use sessions?

    You have to pass the first parameter via pdfout. Php When you resonate database query results, you should add record identifier to href for links like this:

      echo & lt; A href = "pdfout.php? Id = '. $ Info [' your_id_field ']." "& Gt; ' $ Info ['address']. '& Lt; / a & gt;';   

    Then get the code for what you're interested in. $ _ GET ['Id'] can use pdfout.php .

    In the form of another note, you can actually enter mysqli Or mysql instead of PDO because it has been deprecated. Also, you need to make sure that you have $ against SQL injection Maoload and $ search have been taken from Has not made it clear whether or not, so I thought I'd mention it).

    ruby - How to run AWS instances with attached ephemeral disks with the fog library -


    I would like to know what is the option of "block-device-maping" in the ec2 fog library To include short-term discs on examples of AWS, command line -stone-instance command line.

    There is a reference on BlockDeviceMappings in the Cog source code. But since the documentation is a bit short and I am not a Ruby expert, any help will be welcomed! "post-text" itemprop = "text">

    It looks like the command line is & lt; Devicename & gt; = & Lt; Block Devices & gt; . That is why we should be able to do this in fog in one of the ways. Using your values, the model version will look something like this:

     compute = Fog :: Compute.new (...) compute.servers.create (: block_device_mapping => [{'deviceName' = ' & Gt; '' / dev / sdb ',' virtualname '= & gt;' ephemeral0 '}, {' deviceName '=>' / dev / sdc ',' virtualname '= & gt;' ephemeral1 '}, {'DeviceName' = & gt; '/ dev / sdd', 'virtualname' = & gt; ephemeral2 '}, {' deviceName '= & gt;' / dev / sde ',' virtualname '= & gt; Ephemeral3 '},],: image_id =>' Ami-xxxxxxxx ')  

    or lower level, more direct path may look like this:

     compute.run_instances (' Block_device_mapping = & gt; ['DeviceName' = & gt; '/ dev / sdb', 'virtualname' = & gt; ephemeral0 '}, {' deviceName '= & gt ;,' ami-xxxxxxxx ', 1, 1, '/ Dev / sdc', 'virtualname' = & gt; ephemeral 1 '},' suffix C Name '= & gt;' ephemeral2 '}, {' deviceName '= & gt;' / dev / sde ',' virtualname '= & gt; ephemeral 3'},])  

    I Recommend a high-level one because it is a little easier to use / understand (and sets something and a good omission for you). Hope that comes close to a good solution for you, but is happy to continue the discussion.

    Use a custom ID type in mongodb usyng python -


    I am using a memodab as a storage backend for some of my information in a Django 1.5 app.

    Each document stored in the Mongodb archive has a _id field that is a decrypt made of several strings. Now when I try to recover this information, I map the document in a model class using the Mongoengine: ago>

    I can see: < TypeError

      type 
      document = MyClass.objects print document   

    The error / view name / id should be an example (str, unicode, object), no & lt; Type 'dict' & gt;

    The worse is that when I use to save the writings

      obj = MyClass ({"tag": "sometag"}) Obj.save ()   

    I get the same error, but _id = {"tag": "sometag"} was created in the DB archive. >

    What could be any thoughts? It may be that this is the case.

    Note: I tried to use Embedded Documentfield but the results are the same (error takes the name of my embedded class instead of 'encrypted')

    I found:

    I was missing the primary_key argument if I Change it to model:

      Class MyClass (document): id = DictField (primary_key = true)   

    It starts working on both operations , Read Write more.

    Here is the official doctor:

    vba - In a Word Form how to detect the field the cursor is sitting on -


    I have word form with some fields and a command-button. When the user clicks on that button, The back VBA code likes to dump a certain text (such as "ABC"), whatever cursor it is on. All my searches show that I have to use the name of the field, but I do not know who the cursor is sitting on. Post-Text "itemprop =" text ">

    My problem was that I was looking for a kind of property of formfield. I did not find any one, however, the following single description gives the desired text to any form field Which currently is sitting on the cursor:

      selection.ange = "ABC"    

    php - jqueryUI Slider Value isn't saved into DB -


    I am creating a simple page with jQuery UI slider. The goal will be easy to reach: The user transfers the slider, then clicks on the submit button and deposits in DB using AJAX.

    My problem is that there really is no value left in DB.

    Then: Slider + PHP form + Ajax

    If there is a better way to achieve my goal after rewriting my silly code, please do it.

    This is my code:

    Index.php

      & lt ;! DOCTYPE & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; UI test & lt; / Title & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js" & gt; & Lt; / Script & gt; & Lt; Style type = "text / css" & gt; #Container {Background: URL (BG.JPG)! Important; Padding: 100px 50px 0px 50px; } / * Slider background * / .slider {width: 230px; Height: 11px; Background: url (slider-bg.png); Status: Relative; Margin: 0; Padding: 0 10px; } / * Style for slider button * / .ui-slider-handle {width: 24px; Height: 24px; Status: Completed; Top: -7px; Margin-left: -12px; Z-index: 200; Background: url (slider-button.png); } / * Result div where slider value is displayed * / # slider-result {font-size: 50px; Height: 200px; Font-family: aerial, helvetica, sense-serif; Color: #fff; Width: 250px; Text-align: center; Lesson: 0 1px 1px # 000; Font-weight: 700; Padding: 20px 0; } / * This fill color color is / / .ui-widget-header {background: url (fill.png) No-repeat left; Height: 8px; Left: 1px; Top: 1px; Status: Completed; } A {framework: none; -moz-outline style: none; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "slider" & gt; & Lt; / Div & gt; & Lt; Div id = "slider-result" & gt; 50 & lt; / Div & gt; & Lt; Form method = "post" & gt; & Lt; Input type = "hidden" id = "hidden" name = "hidden" class = "favorite" /> & lt; Input type = "button" id = "bottone" value = "send data" & gt; & Lt; / Form & gt; & Lt; Script & gt; $ (".slider"). The sliders get a live reading of the value and print it on the page slide: Functions (events, events, events, events, events, events, events, etc.): Slider ({Live: "minimum", value: 50, min: 10, max: 100, phase: 10, //) UI) {$ ("# slider-result"). Html (ui.value);}, updates this hidden form field so that we can submit data using form changes: function (event, UI) {$ ('#hidden'). Ether ('value', ui.value);}}}; Click $ ("#boton") (function (e) {e.preventDefault (); var name = $ ("#hidden"). Val (); / * var last_name = $ ("# last_name") Val (); * / var datastring = 'name =' + name; $ .ajax ({type: 'post', data: data string, url: 'screwdb.fp', success: function (data) {warning (data) ;}});}); & Lt; / Script & gt; & Lt; Div id = "risultato" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

    scrividb.php

      & lt ;? Php $ link = mysql_connect ('localhost', 'username', 'pass'); $ Database = testui; Mysql_select_db ($ database, $ link); $ Name = $ _POST ['hidden']; $ Insert = "Insert slivalui values ​​('$ name')"; If (mysql_query (insert $)) {echo "success, value:". $ Name ""; } Else {resonant "can not be inserted"; } ;? & Gt;    

    your var dataString = 'name =' + name; / Code> to var dataString = {name: name}; Hold it on the PHP side with the $ name = $ _POST ['name'];

    Also: Update form fields with val (new_val) instead of using attr (); Your change event should contain the code:

    Changes: Function (Event, UI) {$ ('# Hidden'). Val (ui.value); // set value of the form field}

    jquery - how to split browser window -


    I am working on a web base application and I need to split the browser window vertically I right column app The html / css and content will be divided, while the left column will display another website and it will use most of the place. I believe I can do it with an iframe but I wonder if there is a different approach that I can give it to.

    The left column, part of the application, will be optional, so that the user can choose to disable it and the external website / iframe should occupy the width of the entire window.

    I need two vertical scroll bars for two columns and the left column should not overlap the other.

    If someone can tell me in the right direction then I would be very appreciative.

    Thank you.

    "post-text" itemprop = "text">

    You can divide the window by using divs, and you can use another location by hiding a div. See example of this code:

      & lt; Button onclick = "document.getElementById ('leftArea'). Style.display = 'none'" & gt; Hide left area & lt; / Button & gt; & Lt; Div style = "width: 100%; height: 100%" & gt; & Lt; Div id = "leftArea" style = "float: left; width: 50%; background-color: # FF 20000" & gt; Left Area - Iframe below: & lt; Br / & gt; & Lt; Iframe src = "" width = "100%" height = "100%" & gt; & Lt; / Iframe & gt; & Lt; / Div & gt; & Lt; Div style = "width: 100%; background-color: # 0000ff" & gt; Correct area & lt; / Div & gt; & Lt; / Div & gt;    

    SQL Database Design Many to Many -


    I am creating a database based on a sports game to store matches and every player will be involved in every match. is. I am having trouble solving a lot of relationships. I currently have the following applause:

    Player

      ID name < / Code>  

    match

      ID date   

    player match

      player_id match_id home_team goals_for goals_against   

    There will always be at least two players in a match. What is the best design for this approach?

    I will advise you to stick to many people with many relationships, this will give you a lot of data model Not allowing complexity to easily change how many players' specifications in a game.

    Player

      ID name   

    Mail player match < player map to player Foreign key from code> from player match

      - A player has played in all the matches. Select from M * Play Player Player Join PIID = pm.player_id on PM at PM.m.id = pm.match_id where PID = / * Your Player ID * / - Select All Players in a Match P . * Match Mim to Player Map PM at MID = pm.match_id PID at POIP P.ID = pm.player_id WHERE m.id = / * Your Match ID * / - Player Information for a Match by PM * Player Join Player Map at p.id = pm.player_id Join m.id = pm.match_id on match mf WHERE p.id = / * Your Player ID * / and MID = / * Your Match ID * /    

    WebSphere Portal 8 Remote Action -


    I am setting up a remote operation, but I want to specify the authoring template. How can I get atid (or authoring template id)?

    Here is the document: [Plugin: Remote Action Action = "New" type = "com.ibm.workplace.wcm.api.Content" Atid = "ID1"]

    Here is a link to the docs:

    The name does not work, it is looking for an item ID (I think). I tried digging through the WCM data export and I tried to follow the HTTP requests while reaching the authoring template, but I did not know how to get that ID, I made it more complicated Am I Any help is greatly appreciated.

    I have gone to the specific elements for which I had to get UUID and put them on a new In the library, I exported that library by myself and used grep to find the references to the ethering template and Si area. This was the move -P

    java - FileOutputStream.close is really slow when writing large file -


    I have a method that receives the file on a TCP socket using this code:

      FileOutputStream file stream = new FileOutputStream (filename.getName ()); While (total read ) {if (size - totalRead> CHUNKSIZE) {read = getInputStream () Read (buffer, 0, CHUNKSIZE); } Else {read = getInputStream () Read (buffer, 0, size - total read); } TotalRead + = reading; FileStream.write (buffer, 0, reading); FileStream.flush (); If (System.currentTimeMillis ()> Next Print) {nextPrint + = 1000; Int speed = (int) (total read / (system quartime milliseconds) - starttime); Double content = ((double) total read / size) * 100; Gui.setStatus ("Receiving:" + filename + "" + Speed ​​+ "KB / S," + + "+"% Completed ");}} Gui.setStatus (" Resizing: "+ Filename +" Completed. "); FileStream.close ();   

    FileOutputStream.close is actually taking a long time when large files are received, why is it? As you are seeing that I Flush the stream on the received piece.

    Depending on the OS, the flush () More data on the OS In the case of FileOutputStream, writes () passes all the data on the OS, so flush () does not do anything where close () can ensure that the file is actually Written on the disk (or not dependent on the OS) you can see that the disk is still busy while writing data.

    500 MB files that take up to 30 seconds means that you have 17 Writing MB / S. It is like a very slow disk or That's the file on the network share / drive.


    You can try it

      file file = file. CreateTemplate file ("Deleteme", "dat"); // Put your file here FileOutputStream fos = New FileOutputStream (file); Long start = System.nanoTime (); Byte [] bytes = new byte [32 * 1024]; For (long L = 0; L & L; 500 * 1000 * 1000; L + = bytes. Lamps) fos.write (bytes); Long Middle = System.nanoTime (); To write System.out.printf ("%, D bytes% n" takes% .3f sec, (middle start) / 1e 9, file. Length ()); Fos.close (); Long end = System.nanoTime (); System.out.printf ("took% .3 seconds to close% n", (end-middle) / 1e 9);   

    print

      to write 500,006,912 bytes took 0.116 seconds to close 0.002 seconds   

    you see The speed is that the data on this system is not even writing on a close i.e. this drive is not fast.