w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Creating a database by gathering data with a customized web form
Sounds like what you need is a simple web page with database. You could use some free web host which provides you with database, free domain and some disc space. There are plenty of those. If you dont know how to make a web page yourself, then its easy to find someone who can.

Categories : Database

Git: How to manage multiple branches on submodule and tie them to particular branches on main repo
It sounds like what you need to do is move the sub-module to a separate repository and use it as an external in the main repository, you can then tag specific versions, (and branches), of the external in the main and vice versa.

Categories : GIT

Gathering counts of multiple tables in a single query
maybe you need to union things... select * from ( SELECT 'revenue' tbl, count(*), constituentid id FROM REVENUE union SELECT 'constituent', count(*), id FROM CONSTITUENT ) where id = ?

Categories : SQL

XSLT gathering data
You need to structure your code according to the structure of the output, not the structure of the input. Don't try to do things as you encounter information in the input; do them when you need to generate the relevant piece of the output. There are cases when this can seem inefficient because it means visiting the same input more than once. Usually these inefficiences will prove apparent rather than real. But the first thing is to get the transformation working; if it's not fast enough you can come back to us with another question.

Categories : Java

Gathering data from HTML files
You need to implement a scraper, i.e. an application that scrapers data out of HTML. I'd start by looking into a decent scraper library, like jsoup (http://jsoup.org/) and see if you can use it to do the job. In essense you will end up with something like: Document doc = Jsoup.connect("http://www.ncpublicschools.org/...").get(); Elements schools = doc.select("div.indenter p span.colorText2 a"); Just keep on applying select rules as necessary to collect the data you need.

Categories : Java

Gathering data-* information with JQuery
You're currently using .data() incorrectly to set data-editValue. Simply change this: $(this).data("editValue") = ui.value; to this: $(this).data("editValue", ui.value); When getting use $(selector).data('key'); and when setting use $(selector).data('key', 'value');

Categories : Jquery

view not gathering data from service through controller
Main module definition should look like: angular.module("projyApp",[/*dependencies go here*/]); Service should look like //this use of module function retrieves the module //Note from comments in angular doc: This documentation should warn that "angular.module('myModule', [])" always creates a new module, but "angular.module('myModule')" always retrieves an existing reference.) angular.module('projyApp') .service('dataService', [/*dependencies,*/function() { var service = { examples:[], getAllExamples = function () { $http.get("../../TestData/Examples.json").success(function(returnedData){examples = returnedData}); } } return service; }); Controller should look like: angular.module('projyApp') .controll

Categories : Json

Gathering JSON data from external file
Try this jquery code : $(function() { $('#fetch').click(function(){ $.getJSON('yourjsonfile.json', function(data) { destinations = data['Destinations'] $.each(destinations, function(id, destination) { $('select').append('<option value="">'+destination["destinationName"]+'</option>') }) }); }) })

Categories : Jquery

Web App: Gathering unknown amount of data from user an unknown number of times
Do you mean something like this http://www.labs.mimmin.com/inlineedit/ http://dev.iceburg.net/jquery/tableEditor/example_new.php I found it on google by using 'jquery inline editable table' I know Yii has a nice admin interface specifically fast input, but I sense you wrote the code yourself, transferring to Yii might be a bigger challenge that solving this in a nice way. good luck

Categories : PHP

Getting multiple data and them adding them into multiple database entries
This is because you are executing your query outside the while loop. The solution would be to move your mysql_query($sq, $cn) inside the while loop. Also your insert query has VALUE instead of VALUES, please see the insert syntax. while($a1 != $b1){ $b1++; $state = "state".$b1; $name = "name".$b1; $info1 = "info1".$b1; $info2 = "info2".$b1; $sq="INSERT INTO ftable(Country, State, Name, First, Second ) VALUES('$c1', '$_POST[$state]', '$_POST[$name]', '$_POST[$info1]', '$_POST[$info2]')"; echo "</br>Country:$c1</br> State:".$_POST[$state]."</br> Name:".$_POST[$name]."</br> Info1:".$_POST[$info1]."</br> Info2:".$_POS

Categories : PHP

GIT CSS Multiple branches, so many conflicts
The only way I figured out how to do it is Create a new feature 1) Checkout ONLY the SASS folder from the last edited branch (e.g. git checkout feature/sass-01 path/to/sass) - This will only pull in the SASS so you will not have any of the template files you changed Have sass --watch sass:css running and it compile the CSS for you ready to start working on right away. 2) Add/Edit the SASS files and template files to fix the ticket When you are ready to deploy multiple features for testing 1) Go back into their feature branches 2) Checkout SASS folder from the VERY LAST feature you worked on. Have have sass --watch sass:css running. 3) Git Commit and Git Push the SASS / CSS files.

Categories : GIT

How does one divide changes among multiple branches in git?
The problem with git stash and multiple branches is that once it is popped you have to stash again for the next branch. To get around this it is easy enough to just use a temporary branch. git checkout -b temp_branch git commit -a -m 'Changes that will go to several branches.' git checkout W git cherry-pick -n temp_branch (fixup all files here here) git commit -a -m 'Changes for W.' git checkout X git cherry-pick -n temp_branch (fixup all files here here) git commit -a -m 'Changes for X.' git checkout Y git cherry-pick -n temp_branch (fixup all files here here) git commit -a -m 'Changes for Y.' git checkout Z git cherry-pick -n temp_branch (fixup all files here here) git commit -a -m 'Changes for Z.' git branch -D temp_branch

Categories : GIT

Is it possible to show if git branches have the same commits if the one of the branches has been rebased so they don't have the same SHA1 IDs?
Using git log with the --cherry-mark option will work. Specifically, you can see a set of commits that are the same between a branch A and a branch B with the following: git log --cherry-mark --oneline --graph --decorate A...B Example output: $ git log --cherry-mark --oneline --graph --decorate master...feature = 1e4f971 (HEAD, feature) Add some greetings = 926857a Add some greetings = bfede5b Add some greetings = 14099b6 (master) Add some Hellos = a0576fa Add some Hellos = 8822553 Add some Hellos In the above output, you will see that the first 3 commits in the output for feature are equivalent to the first 3 commits in the output for master, though the sha IDs and commit messages are different. From the official Linux Kernel Git documentation for git log: --cherry-mark Lik

Categories : GIT

Why is merging feature branches into release branches a bad idea?
One case I could think of, where this can make thing go complicated is that it will start blocking further development. Consider you are developing a feature A, which will go immediately on your next release. Now there is another development team which will be working on feature B, which is heavily dependent on feature A, but it needs to be in release only after a couple of sprints. So, obviously we will branch out feature B from feature A. Now, you find a bug in feature A, your release for feature A is approaching fast, you have two options a hot-fix/hack or a proper code re-factor and fix. With time as constraint, its wise to have hot-fix, but considering future we need proper re-factor and fix. Happy news is that we can go for both. With your strategy (from what I understand) you

Categories : GIT

Understanding How Local Git Branches "Track" Remote Branches
The arrow is just a symbolic ref, showing a layer of indirection between remote origin/HEAD branch and remote origin/master branch. In order to see tracking you need to add a flag to trigger a higher level of verbosity. Here's the output of the same command with the -vv flag. The -vv flag adds verbosity to the output about each branch. Consider the line for the master branch. It now gives the SHA-1 hash of the head commit for the branch, and then, in brackets, it tells us the remote branch that the master branch is tracking -- origin/master. This tracking was established by git when we cloned our local repo; master is the only branch for which tracking is auto configured. Next, I also configured my local bDev branch to track the branch of the same name on the origin remote.

Categories : GIT

Waiting Queue with Multiple Branches
C# (and most other languages) has a concurrent priority queue that you could use. Place the test takers on the queue, and remove one (and assign one test to it) whenever a room frees up; if the test taker has more tests left to take, then put it back on the queue. One way to balance your execution times is to assign a random priority to your "test-takers," e.g. testTaker.serPriority(random.Next(CONSTANT * testTaker.numberOfRemainingTests)) Then reset the test taker's priority whenever it completes a test. This will favor assigning tests to test takers with more tests to take, while the random element will approximate fairness. CONSTANT ought to be greater than the number of test takers to ensure sufficient randomness.

Categories : Algorithm

git push to different branches on multiple remotes
Use colons! As per git-push doc: The format of a parameter is an optional plus +, followed by the source ref , followed by a colon :, followed by the destination ref . It is used to specify with what object the ref in the remote repository is to be updated. If not specified, the behavior of the command is controlled by the push.default configuration variable. The is often the name of the branch you would want to push, but it can be any arbitrary "SHA-1 expression", such as master~4 or HEAD (see gitrevisions(7)). The tells which ref on the remote side is updated with this push. Arbitrary expressions cannot be used here, an actual ref must be named. If : is omitted, the same ref as will be updated. So, this should do the trick: `git push firstremote m

Categories : GIT

git, understand local repository when multiple branches
The .git directory is independent of your working copy, it will not be affected by any normal branching, committing, and merging operations you do with Git. You can still work on both your master branch and a feature branch at the same time. To make your feature branch and check it out into your working copy directory, use git checkout -b <feature branch name> master Then you can switch between master and feature as much as you want: git checkout master git checkout feature

Categories : GIT

Best Practice: Multiple branches for different API versions or single branch
I would suggest separate release branches for each API. You can do bug fixes to old versions off of the release branches. You shouldn't have lots of versions of your API. If this is a web API, then non-breaking changes don't need a new version. If this is a programming language API, then each major release should be a branch, with minor releases as tags or sub-branches off of the release.

Categories : Api

Git merge strategy for maven project hotfix releases with multiple branches
Have you considered moving away from Git Flow? The project I work on used it when we first started using Git; however, it got to the point that it was getting in the way more than it was helping. The issue of using it to do hotfixes of previous releases is what finally caused us to decide to drop it once and for all. In retrospect, it was good decision and we should have done it sooner. Today, we just do simple feature branches merged to master along with tags. We haven't had any problems and hofixes of previous releases is no longer such a pain.

Categories : GIT

Saving multiple data one at a time in database in Android
Mistakes: content.add(SubBrandCode); do you know how to remove the '[ ]' in the saved data? (e.g. [AC001]) All I want to save is the AC001 only. Solutions: Call clear() method of ArrayList before adding new values into it. Its giving you [AC001] as you are subBrand by doing content.toString();. Don't convert it to string, instead use content.getString(position) and it will give you String value.

Categories : Android

I want to fetch multiple data from oracle database and want to store it into another variables in C# .net
Not sure that this would be the root of the issue, but this might be giving you some weird data from your SQL query: Did you mean OC.CITY AS discm instead of OC.CITY discm? Also, just a suggestions that you might want to specify a type for the columns of your datatable: dtbl.Columns.Add("accid", typeof(int)); dtbl.Columns.Add("srno", typeof(int)); dtbl.Columns.Add("names", typeof(string)); etc.

Categories : C#

Inserting and updating data on multiple table on SQLite database
I did it at last. :D I don't what was the problem but with changing the DatabaseHelper and Database Helperclass as below and changing input variable of functions used in this class to string, the problems had been eliminated. here is the DatabaseHelper class: public class DatabaseHelper extends SQLiteOpenHelper { private final String TAG = "DatabaseHelper"; private static final String DATABASE_NAME = "database"; private static final int DATABASE_VERSION = 1; private static final String COLUMN_ID = "_id"; private static final String COLUMN_NAME = "name"; private static final String COLUMN_VALUE = "value"; private static final String COLUMN_VALUE2 = "value2"; private static final String TABLE_NAME_1 = "table1db"; private static final S

Categories : Java

How to insert multiple form data to database from jquery table
Need to return inserted value to the model as json type. <style type="text/css"> #table1 tr { vertical-align: top; } #table1 tr td { width: 100px; } </style> <script type="text/javascript"> $(document).ready(function () { $("#butsend").click(function () { if (true) {//Check Validation $.ajax({ url: "save.php", type: "post", data: $.param($('#form1').serializeArray()), //data: JSON.stringify({}),//Pass json model success: function (data) { $("#table1").append('<tr><td>' + data.model.id + '</td><td>' + data.model.sname + '</td><td >' + data.model.age

Categories : PHP

Using Data.Machine, how would you describe a plan that branches with results of a non-deterministic function?
I believe you need to embed your computations into the [] monad, which is a natural way how to model non-deterministic computations. Then you'll have ProcessT [], PlanT [] etc.: toProcess :: ND a b -> ProcessT [] a b toProcess = construct . plan where plan n = do a <- await case runN n a of [] -> stop xs -> do (b, n') <- lift xs yield b plan n' ret :: [[Int]] ret = runT $ source ["hello", "world", "again"] ~> toProcess nd -- produces: [[5,15],[105,15]]

Categories : Haskell

Multiple access to database. How to prevent separate threads from modifying the same data?
Well for starters (because I saw this in the MySQL tag) here's the relevant MySQL manual page : http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html , in this case simply doing LOCK TABLES someTableName WRITE; ... UNLOCK TABLES; With SQLite specifically I found this SO question Explicit locking mechanism in SQLite , taking that example you'd be looking at something like BEGIN EXCLUSIVE TRANSACTION; ... COMMIT TRANSACTION; However it also mentions that will lock the whole database and not just the tables in question. The link included in that answer for the SQLite documentation is http://sqlite.org/lang_transaction.html Overall it sounds a bit as if SQLite may not be the best database for you to be using as locking the entire database could create quite a bottleneck. If viable

Categories : C#

Mouse hovering popup on multiple text paragraphs, using data from database
You can use CSS only for the mouseover: http://jsfiddle.net/DbuDL/ .tdone, .tdtwo { width: 400px; height: 100px; overflow: hidden; border:1px solid black; background-color: white; } .tdone:hover, .tdtwo:hover { overflow:visible; height: auto; } But from a usability point of view it would probably be better to use an onclick event to collapse/expand the area. EDIT: I've udpated jsFiddle : http://jsfiddle.net/DbuDL/1/ to use JavaScript for the mouse click. You also need to place an image within the area that you want to show/hide.

Categories : PHP

Gathering Logs within Rack::Test
You need to stub and set expectations on whatever method your custom logger is calling to write its output. So, for example, if your custom logger writes directly to STDERR with a single argument, you would use: STDERR.stub(:write) {|arg| expect(arg).to_not match(/password/)} If your custom logger writes to the default logger (i.e. env['rack.errors']) instead of STDERR, then you would stub the write method of that object instead. I would have shown that example, but I can't figure out how to get a hold of the Rack environment within an RSpec test. A couple of notes on this implementation: The use of any_number_of_times, as in STDERR.should_receive(:write).any_number_of_times is deprecated in favor of stub There is no reasonable regex to match strings which do not contain a particula

Categories : Ruby

Screen scraper for creating a log of gathering in a RPG
If you are serious about creating this program I would suggest you forget about scanning the screen, image analysis gets very complicated very quickly. Instead look into memory reading, the information shown in the game can also be read as a straight up value from the games working memory. There are probably resources out there for your game already, google it. World of Warcraft Diablo 3 etc

Categories : C#

Gathering system activity information
Makes me think of the top command, which supplies about all info. The source code libtop.c should be easy to find. Here's one link to get you started.

Categories : Objective C

Gathering information from few forms in django
I think this would be most easily solved by making a form which includes both the search term and any filters; you can place the form elements wherever you want. Your form would have to be something like: from django import forms class MySearchForm(forms.Form): FILTERS = (("lt20", "Less than 20"), ("20to50", "Twenty to fifty"), ) term = forms.CharField() filters = forms.MultipleChoiceField(widget = CheckBoxSelectMultiple, choices = FILTERS) Then you would have to display the form manually, so you can split it up however you want in the template. In other words, instead of using a filter like {{form.as_p}}, you would have to do {{form.term}} and {{form.filters}}. You could also define your filters in a model, so that yo

Categories : Python

Gathering every other string from list / line from file
You could use a list comprehension: input_file: Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 Python: >>> with open("input_file") as f: ... alternates = [line for i, line in enumerate(f) if not i % 2] ... >>> alternates ['Line 1 ', 'Line 3 ', 'Line 5 ', 'Line 7 ', 'Line 9 '] Further reading: the enumerate() built-in function.

Categories : Python

Design pattern for aggregation/gathering from different sources
your problem statement does not seem like fitting into scope of a single design pattern. As you have mentioned you are getting data from different sources and want to group them in that case a Composite Pattern can be a good choice. As you need to communicate to different sources for input, it would be good to have that part completely asynchronous so that you don't block your main program for that. You might also want to use an abstract factor as you seem to have need to initialize multiple instances of different source system interaction APIs. And to keep your other systems/services independent of each other, dependency injection would be good to have. Hope this helps.

Categories : C#

API response - gathering errors from included classes
You need to use a custom error handler. See this link - http://php.net/manual/en/function.set-error-handler.php It allows us to handle a error that might be thrown to capture it and process it. So, when you capture it, you can pass this to the parent class and furthur upstream for further processing.

Categories : PHP

Preloaded "Core data" database not showing the correct new data after updating the database
Clearly, the store is not deleted when you have a new updated one. Therefore you see the old values. If you want to delete the store if there is a new one, you could check for a NSUserDefault with a version or something that tells you if an update is necessary. If yes, delete the persistent store, copy the new one and set the user default to the new version. However, all the user data would be lost then. There are two solutions to this: 1) You can have two persistent stores, one for "static" data and one for user data. However, this might be a bit too complex. 2) Alternatively, you could include information of the changed data and simply update the database (copy only if it does not exist, i.e. if it is a new installation). This would preserve the user data as well. In fact, if the

Categories : Iphone

Gathering SQLite row id to delete entry from context menu
You don't have the id in the onContextMenuItem() callback but you do have the position of the row for which the context menu was built and you can use that to find the id: public boolean onContextItemSelected(MenuItem item) { AdapterContextMenuInfo information = (AdapterContextMenuInfo) item.getMenuInfo(); int rowPosition = information.position; HashMap<String, String> rowdata = adapter.getItem(position); long index = rowData.get("rowid"); // I'm assuming that is the id // profit... For non cursor based adapter the id returned for a row will simply be the position of that row in the adapter.

Categories : Android

Gathering Crash logs off Samsung Galaxy Devices
Most of the Galaxy series are on Android 4.1 and higher, in which case the only app that can get log data is the app that logged it, not a third-party app. Hence, the right way to get crash logs is to have that be baked into your app (e.g., via ACRA) or to rely on the crash data supplied to the Play Store.

Categories : Android

python list comprehension: gathering duplicate columns
Looks like a job for collections.defaultdict: >>> from collections import defaultdict >>> L = [['5th ave', 111, -30.00, 38.00], ... ['5th ave', 222, -30.00, 33.00], ... ['6th ave', 2224, -32.00, 34.90]] >>> d = defaultdict(list) >>> for sublist in L: ... d[sublist[0]].append(sublist[1:]) ... >>> print d.items() [('5th ave', [[111, -30.0, 38.0], [222, -30.0, 33.0]]), ('6th ave', [[2224, -32.0, 34.9]])] There's absolutely no reason to have a list comprehension. Just because it's less lines does not mean it's more pythonic.

Categories : Python

Socket can be send only once and the Textview is not gathering the information from the server
The run method in your server class will run only once. while(start == false){ } This while loop will continue to loop until you call the onClick method, at which point the rest of the code in the run() method is executed, and the server thread killed. You need to rearrange your code a little, and place it inside the while loop: public void run() { while (true){ try{ InetAddress serverAddress = InetAddress.getByName(SERVERIP); updatetrack("nServer: Start connectingn"); DatagramSocket socket = new DatagramSocket(SERVERPORT, serverAddress); byte[] buffer = new byte[17]; DatagramPacket packet = new DatagramPacket(buffer, buffer.length); updatetrack("Server: Receivingn"); socket.receive(packet); updatetrack("Server: M

Categories : Java

How can I handle different data types in an Entity-Attribute-Value design (e.g. single table with multiple columns or multiple tables per data type)?
This is a well known problem. The problem with the approach you mentioned is that you need to know the type of the attribute before you query for it. it's not the end of the world because you manage metadata but still... Two possiable solutions might be using a varchar2 datatype to represent all data types in a known format. Numbers and chars are no problem, date values can be written in a predefined manner (it's like implementing to_String() in any OO design). use the ANYDATA data type. i personally played around with it but decided not to use it.

Categories : Database



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