w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Windows Workflow Foundation: Persist in Parallel Sequences
Your basic premise is wrong..... Workflow will only be processing one of the tasks, it can't be processing 2 AND 6. It will not process 6 until task 2 completes, and that branch becomes idle (at the Persist point). So the fact that the whole workflow gets persisted doesn't matter.

Categories : Dotnet

Is there a way to persist cookies or HTML5 localStorage across WebBrowser instances on Windows Phone?
I'm not sure if this is expected behaviour or not. To get at the Isolated Storage you will need to use JS/.NET interop. if you want to trigger the persistent storage from JS: Use window.external.notify in JS, generating a JSON string (for instance) to pass along to the .NET side. That could be written to IsolatedStorage without the .NET having to parse the data. You could use IsolatedStorage.AppSettings or a full file depending on the size of the data. Alternately you could trigger the process from .NET: Call WebBrowser.InvokeScript to call a JS function which returns the same JSON string representing your data. The .NET side could detect and restore this data on startup and use WebBrowser.InvokeScript to pass the JSON string back into the WebBrowser via a JS function. You'd of co

Categories : HTML

How to set up MySQL on Windows to accept UTF-8 data via Groovy JDBC connections
As long as your db/table/column is set to use UTF-8, you can try changing your connection params to: def sql = Sql.newInstance( 'jdbc:mysql://localhost/db?useUnicode=true&characterEncoding=UTF-8', 'root', '', 'com.mysql.jdbc.Driver' )

Categories : Mysql

How to find the mysql data directory from command line in windows
You can issue the following query from the command line: mysql -uUSER -p -e 'SHOW VARIABLES WHERE Variable_Name LIKE "%dir"' Output (on Linux): +---------------------------+----------------------------+ | Variable_name | Value | +---------------------------+----------------------------+ | basedir | /usr | | character_sets_dir | /usr/share/mysql/charsets/ | | datadir | /var/lib/mysql/ | | innodb_data_home_dir | | | innodb_log_group_home_dir | ./ | | lc_messages_dir | /usr/share/mysql/ | | plugin_dir | /usr/lib/mysql/plugin/ | | slave_load_tmpdir | /tmp | | t

Categories : Mysql

how to persist data for two forms
I think you should try make it one form, but display in 2 tabs: create a new entity which have 2 field $affairePS (AffairePanneauSolaire) and $affairePC (AffairePompeChaleur) implement getters and setters for those 2 fields create a new form class with data_class of newly created form render the new form within 1 <form>, but display as 2 tabs, both tabs have submit button Form class code: class BarType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('affairePS', new AffairePanneauSolaireType()) ->add('affairePC', new AffairePompeChaleurType()) ; } public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefau

Categories : PHP

I can persist data through the test but not through the app. aop problems
It seems that you missed for your CalculatorServiceImpl. While your dispatcher-servlet.xml does. Have a try that adding <context:component-scan base-package="where your service is"/> in your root application context and remove unnecessary component-scan in your dispatcher-servlet.

Categories : Spring

Where should I store data that needs to persist for a given appleID?
Yes, nsubiquitouskeyvaluestore is the way to get it synched with new devices. Using this in conjunction with both keychain for storing on a device after app as been removed and nsuserdefaults for quick and easy unconstrained access is the way to go. Apple also has a way to read receipts for the actual app purchase now, but it only works for iOS 7. Solutions should conditionally rely on receipt data from nsbundle.mainbundle url if it is available.

Categories : Iphone

C# MVC, persist display only data to the controller
I don't know if I understood it correctly. If you want to pass non-editable data through form, you can use : @Html.HiddenFor(model => model.NonEditableFieldToBePassed)

Categories : C#

Persist sensitive data in browser? Possible?
It is recommended to do basic threat analysis. It helps to recognise what attack vector take into account and then you can choose the right method of protecting the key. There are several possibilities of key protection. See following examples: you can rely on browser origin policy and assume your JS code as trusted and store the key in localstore - key is not protected from an adversary having access to the user profile you can let the user enter reasonably strong password each time then private need to be accessed and store the key using password based encryption and then the encrypted private key can be stored anywhere (localstore, cookie) - an adversary capable of accessing user password is able to get the key you can create private key encryption key by combining user password and s

Categories : Javascript

How to persist data after mongoose fetch?
findOne is asyncronous, so console.log is executed before findOne is finished var totalSize = 0; for (var i = json[0].game.length - 1; i >= 0; i--) { //When I found a game, I would like to increment his size in totalSize Game.findOne({ 'steamID': json[0].game[i].appID[0] }, function (err, game) { if (err) return handleError(err); if (game) { //everything is fine here totalSize is the right number totalSize += game.size; } console.log(totalSize); }) } Do it like this: function findTotalSize(callback){ var totalSize = 0; var gameLength = json[0].game.length; for (var i = gameLength - 1; i >= 0; i--) { Game.findOne({ 'steamID': json[0].game[i].appID[0] }, function (err

Categories : Javascript

How to persist fragment data after backstack transactions?
This doesn't seem right, but here's how I ended up doing: public class MyActivity extends FragmentActivity { private Bundle mMainFragmentArgs; public void saveMainFragmentState(Bundle args) { mMainFragmentArgs = args; } public Bundle getSavedMainFragmentState() { return mMainFragmentArgs; } // ... } And in the main fragment: public class MainFragment extends Fragment { @Override public void onActivityCreated(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle args = ((MyActivity) getActivity()).getSavedMainFragmentState(); if (args != null) { // Restore from backstack } else if (savedInstanceState != null) { // Restore from saved instance state

Categories : Android

How to persist data via has_many through association in rails
First you will have to find transaction_group record which you want to associate with transaction: transaction_group = batch.transaction_groups.find(id) #(or batch.transaction_groups.first for first record) Then you can create associated transaction record by: transaction_group.transactions.build or, batch.transactions.build(:transaction_group_id => transaction_group.id)

Categories : Ruby On Rails

How do I persist graphic data in iPhone/iPad?
As I mentioned in a comment, you might want to look into iOS's state preservation API's. However, if you want to build your own system to do this it'd be pretty simple using some clever categories and dictionaries. Then you can serialize/deserialize your dictionaries using NSKeyedArchiver and NSKeyedUnarchiver. eg: @interface UIButton (MyAppCategory) - (NSDictionary *)viewProperties; - (void)configureFromProperties: (NSDictionary *) properties; @end @implementation UIButton (MyAppCategory) - (NSDictionary *)viewProperties { return @{ @"class" : NSStringFromClass([self class]), @"frame" : [NSValue valueWithRect:self.frame], @"titleLabelText" : self.titleLabel.text, // etc... }; } - (void)configureFromProperties: (NSDictionar

Categories : IOS

Unable to persist data using Spring + Hibernate
It's a failure to commit the TX (or flush Hibernate). Your declarative transactionality isn't working, or the declarations needs to be extended further. Shouldn't the DAO be declared as tranasactional? That's where the action actually happens, your "transactional" declaration at TestService doesn't actually do anything itself -- so Spring may miss enlisting HB into the transaction. I don't generally use declarative, myself, since I find TX boundaries easy & well-defined on user activity -- and more traceable/ reliable when explicitly coded (1 line, via my helper class). Frankly I don't know what you expect to do with your DAOs either -- if you're using JPA/ Hibernate, these layers handle what the DAO would do. I suspect you're gunking up your application with do-nothing classes,

Categories : Java

Can not persist the deletion of a record using Core Data
Context is a "scratch pad". The "scratch pad" concept allows you to made changes locally in that "scratch pad", such as modifying the record or deleting the record, and discard the changes if you decide too. You can also have multiple contexts or "scratch pads", usually one context in each thread, such as one for main thread, and another one for background thread. Now, if you have decided that the changes are OK, you need to persist the changes by saving the context. NSError *error = nil; [context save:&error]; Of course, if you have other "scratch pads" in your app, you will need to sync those changes you have saved in the core data.

Categories : IOS

Simplest way to persist data in Azure - recommended options?
Use TableStorage. For all intents and purposes it's free (it'll be pennies per month for that amount of volume a fraction of your web roles anyway). As for how complicated you think it is, it's really not. Have a look at this article to get going. http://www.windowsazure.com/en-us/develop/net/how-to-guides/table-services/#create-table //Create a class to hold your data public class MyLogEntity : TableEntity { public CustomerEntity(int id, DateTime when) { this.PartitionKey = when; this.RowKey = id; } public MyLogEntity () { } public string OtherProperty { get; set; } } //Connect to TableStorage var connstr = CloudConfigurationManager.GetSetting("StorageConnectionString") //Config File var storageAccount = CloudStorageAccount.Parse(connstr); // Cre

Categories : Asp Net Mvc

Excel VSTO persist data entered into a WinForm
Take a look at this CodeProject page, Saving the state (serializing) a Windows Form. I've used it in Excel VSTO applications that incorporated WinForms and it works beautifully. It's also very easy to customize it to include any of your controls that are not already built into the class, as well as change the format of how the control data is saved, etc. In short, you are able to do two calls in your code: FormSerialisor.Serialise(this, myPath + @"myFormName.xml"); and FormSerialisor.Deserialise(this, myPath + @"myFormName.xml"); Very simple and very fast. It's written in C#, but it can be used in VB.Net projects as well by compiling the class and then referencing the .dll

Categories : C#

Symfony2 OneToMany – Persist Data from embedded form
It's because you use getData() and than persist() it. You should do this instead: if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($user); $em->flush(); }

Categories : Forms

Why does deleted data persist in SQL Server backup file?
When you delete data in a SQL Server database, SQL Server just marks the pages as free, but does not overwrite the data. Just like any modern file system does not actually delete the files but instead just marks the disk blocks as free. To clean out your database I would try the following: delete the data rebuild all indexes and heaps (rebuild, not reorganize) shrink each datafile with reorganization of the pages to the minimum possible size repeat 2 and 3 a few times execute a checkpoint detach the database and rename the logfile reattach the database forcing SQL Server to recreate a new empty log file (http://www.mssqltips.com/sqlservertip/1894/attach-a-sql-server-database-with-a-missing-transaction-log-file/) run a DBCC CHECKDB to make sure you did not break anything take the backup

Categories : Sql Server

how to persist partial view model data during postback in asp.net mvc
Try searching first. This question has been asked many times before. Here is one way to do it: mvc partial view post Summary: wrap each partial in multiple form tags each with their own submit button. But this one seems more like what you're after: Post a form with multiple partial views Use editortemplates for this instead of partials. The issue you're having is that when your DepartmentName textbox isn't being named correctly for your controller to read it. Your POST would be EmployeeName=Prashant&DepartmentName=Phy therefore Department is null, hence the error.

Categories : Asp Net

Using Azure how do you list blobs in a container for Windows phone 8?
Hello yes the toolkit has been deprecated the other way is I think that you can start using the Windows Azure Mobile Services: http://www.windowsazure.com/en-us/develop/mobile/ if you previously have worked on Windows Azure Node JS then you can easily build a new Windows Azure Mobile API that do the required action which is listing the blob and call this API from your Windows Phone application. here is the resources of the NodeJS and how it uses the Windows Azure Blob Storage: http://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/blob-storage/ to integrate it with the Mobile Services, just fo to your portal, create new Windows Azure Mobile Services and under API enter the NodeJS Code. here is a link demonstrating how to work with it: http://weblogs.asp.net/scottgu/archive/20

Categories : C#

How to store a Dictionary inside a Container in Windows 8 Metro app?
You can use XML serialization. ApplicationData.Current.LocalSettings doesn't support all the data types. There are also some libs available which provide feature similar to isolated storage. They also use XML serialization. Generic Object Storage Helper for WinRT Windows 8 Isolated Storage

Categories : C#

Passing image data buffers to Windows Runtime on Windows Phone 8
Camera api for native code is the way to go: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj571202 you'll get the data directly in your c++ WinRT component code. see an example here : http://library.developer.nokia.com/Community/Wiki/Getting_started_with_the_Camera_APIs_for_native_code

Categories : Dotnet

How do I pass data from my ViewController to a Container View?
You can use prepareForSegue just like any other two controllers -- that method will be called after the two controllers are instantiated, but before either viewDidLoad runs. The other way to do this is to use the parent controller's childViewControllers property (the embedded controller is a child). So, the child will be self.childViewControllers[0]. After Edit: - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"EmbedSegue"]) { MyEmbeddedController *embed = segue.destinationViewController; embed.labelString = self.stringToPass; } } Of course, you have to change the names to what you have. Make sure the name you give to the segue in IB matches the one you check for in the if statement. In this example

Categories : IOS

How can I search a container of objects for a data member value?
My understanding is that std::bind and boost::bind are for member functions and cannot be applied to member data. Remarkably, this is not the case! boost::bind will happily bind to member data and allow you to perform operations on it during an "inline iteration". From the documentation: Pointers to member functions and pointers to data members are not function objects, because they do not support operator(). For convenience, bind accepts member pointers as its first argument, and the behavior is as if boost::mem_fn has been used to convert the member pointer into a function object. In other words, the expression bind(&X::f, args) is equivalent to bind<R>(mem_fn(&X::f), args) where R is the return type of X::f (for member functions) or the type of the

Categories : C++

Left div container as links/nav which upon click of a link, displays content in right div container?
This JSFiddle may be helpful to you. or code : HTML : <div id="wrapper"> <div id="left_div"> <a href="#" id="link1">Link1</a> <a href="#" id="link2">Link2</a> <a href="#" id="link3">Link3</a> <a href="#" id="link4">Link4</a> </div> <div id="right_div"> <div class="container"> </div> </div> </div> Javascript ( Jquery ) $(document).ready(function(){ $("#link1").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Click on line1"); }); $("#link2").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Cl

Categories : Javascript

Can't create container in Azure blob storage with the same name as a deleted container
Although this is an old thread, I had the same question a few days ago, and wanted to post my findings: http://msdn.microsoft.com/en-us/library/azure/dd179431.aspx states under the Exceptions to Default Timeout Interval section: A container that was recently deleted cannot be recreated until all of its blobs are deleted. Depending on how much data was stored within the container, complete deletion can take seconds or minutes. If you try to create a container of the same name during this cleanup period, your call returns an error immediately.

Categories : Python

Container-Bound Google Script not executing even after the container has been shared
The button will run under the users permission. If its anonymous it wont run if it needs any api permission (like reading the spreadsheet) since there is no user. For non anonymous users, you need to add a menu item that will trigger the google permission dialog (just do any dumb api call from it). After the user approves it will be able to click the image button

Categories : Google Apps Script

About Extjs & Sencha Touch. How to get data in Store when define a container?
Let's say you need to set evt_name value of first record from the store. Ext.define("EvtsList",{ extend : "Ext.Container", requires : "Ext.dataview.List", config : { layout : { type : 'vbox', }, items : [ { xtype : 'titlebar', title : '', id:'itemTitle', docked : "top", ui : "dark", } ], }, initialize: function(){ this.callParent(arguments); //data will be passed from Ext.create this.down('titlebar').setTitle(this.recordData.evt_name); } }); Create store and get the first record var store = new Evts(); //Create store store.load({ callback: function(records, operation, success) { var record = records[0];

Categories : Extjs

what is the better way to position two elements in a container using CSS? (one on the left and one on the right of its container)
i think there wont be any problem ..this can be also achieved in may other ways you can also use div.wrap to wrap #first & #second then you could use display:inline-block; in #first & #second while display:inline; in div.wrap and also see should you use inline-block as a substitute of float and also float vs inline-block you could use float:left; only in #first then #second would inherit it.it will give you side by side contents you can also use display:table-row; for div.wrap and display:table-cell; for #first & #second.but its better to avoid

Categories : HTML

Organize container content by container height
There is a standard algorithm Subset Sum Problem for solving this. Problem says You have n integers. Divide n integers into two sets such that |Set1| - |Set2| is minimum. where |Set(i)| represents the sum of elements in ith set. I see you have a similar problem here. Assume your containers as two sets and each box height as an integer which is going to be put in that set. Problem is we have to divide the integers (boxes) in such a way that heights of two containers remain minimum. Relevant Links: Subset Sum Problem - Wiki Geeks for Geeks tutorial - Good One

Categories : Javascript

MySQL & C# MySql.Data.MySqlClient.MySqlException caught in try catch
You forgot one (double) quote in your query string? Specifically before caregiver2Phone. string query = "INSERT INTO childdatabase (name2, age, gender, " + "adress, caregiver1Name, caregiver1Phone, caregiver2Name, " + "caregiver2Phone) VALUES('" + firstName + "','" + age + "','" + gender + "','" + address + "','" + caregiverOneName + "','" + caregiverOnePhone + "','" + caregiverTwoName + "','" + caregiverTwoPhone + "')";

Categories : C#

RDS MySQL Data to a Flat File to Reload in another MySQL - Std CLI Not Working
I would strongly suggest Option C, which is to use an ETL tool to move the data. I have used the Community edition of Pentaho Data Integration very successfully to do the sort of things you're asking about (especially the cleanup). It's more work than a simple dump and load, but you have very good control and can do things like sync up again later and so on.

Categories : Mysql

Lose data serialization when I send a data into Windows clipboard
Based on the link you mentioned and conclusions in there, it looks as if the data variable type must be marked as [Serrializable]. As you need it to be pretty much "everything" you can try using an interface ISerializable class Foo { private ISerrialisable data; ... } So as long as the object is serrializable you should be able to use it with clipboard.

Categories : C#

Bootstrap container-fluid and container
It is, but you will need to remove it from the flow of the container either by placing it outside of it, or using CSS to control it by giving it position:absolute etc. Something like: <div class="logo"> <h1> <a href=""> hello.</a></h1> </div> <style> .logo { position:absolute; top:100px; left:100px; } </style> <div class="container-fluid full-width"> <div class="row-fluid header-top"> <div class="container"> <div class="menu span8"> <div class="navbar"> <ul class="nav" id="nav"> <li><a href="#"> Home </a></li>

Categories : CSS

Is there a better way to check if a STL container is a multi* container
Seeing as there are a small finite number of std::multi* containers, you can just list them: #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <type_traits> template <typename Container> struct is_multi_container : std::false_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::multiset<T, Compare, Alloc>> : std::true_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::multimap<T, Compare, Alloc>> : std::true_type {}; template <typename T, typename Compare, typename Alloc> struct is_multi_container<std::unordered_multiset<T, Compare, Alloc>> : std::true_ty

Categories : C++

I want to add class in the container while droping a div in the container
Check jQuery UI documentation for droppable method used with sortable. You can see the example here.

Categories : Jquery

show container on hover different container
Console gives an error on your facebook jssdk code. Uncaught TypeError: Cannot call method 'getElementsByTagName' of null on line 8: button = container.getElementsByTagName( 'h1' )[0], Try putting it below the page so you give your content the chance to load. Your javascript should work until there.

Categories : HTML

Highcharts not being drawn in some cases when using data from MySQL (page elements created before database query complete?) PHP / MySQL
Here ya go... $('#container').highcharts({ data: { table: document.getElementById('datatable') }....//other chart details.... <table id="datatable"> <thead> <tr> <th></th> <th>Jane</th> <th>John</th> </tr> </thead> <tbody> <tr> <th>Apples</th> <td>3</td> <td>4</td> </tr> <tr> <th>Pears</th> <td>2</td> <td>0</td> </tr> <tr> <th>Plums</th> <td>5</td> <td>11</td> </tr> <tr> <th>Bananas</th> <td&g

Categories : PHP

Fluent NHibernate connection to MySql without MySql.Data in GAC
MySql.data.dll must reside beside the assembly containing the code you posted. Also .Provider("MySql.Data.MySqlClient") and .Driver<NHibernate.Driver.MySqlDataDriver>() are redundant since you already specified MySQLConfiguration.Standard which already does set driver and Provider.

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.