w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Merge a branch, but dont fill gitk with noise BUT dont lie about where it came from
Have you already pushed the dev branch and thus shared it with others? If not, an interactive rebase will do an excellent job git checkout devbranch git rebase -i master Git rebase will give you the opportunity to clean up your history by edit commits, squash them together, split them or even skip some. The above will end up putting the commits of devbranch in a straight history after master. If you feel that is too much "lying" then you can rebase devbranch on its own base, so you can rewrite history but still keep it as a branch starting at the same place as before git merge-base master devbranch git rebase -i <hash output of previous command>

Categories : GIT

div under div - dont know how to do this
Old way: Use a table with 1 row (tr) and 3 cells (td), put your DIVs in those cells, make sure the cells are valign=top. People that shun table layout way: Use 3 container DIVs that will represent your columns, relatively position them side by side (float:). Modern way: Use flexbox positioning https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes or use the CSS column-* properties http://playground.html5rocks.com/#columns

Categories : CSS

Why I dont get what I'm looking for
When you return it ends the function. If you want all the users, you'll want to return that array outside of your foreach loop. But since $users is already an array, you don't even need the foreach loop, aside from doing the explode.

Categories : PHP

UINavigationBar Dont Appear
In simple terms, the system isn't showing the navigation bar because there is no reason for it to, as you haven't wrapped you're view controller in a navigation controller, which is the context in which navigation bars are typically used. To do this, select your view controller and click Window > Embed in > Navigation Controller.

Categories : IOS

How can i set targetPi? i think definition is not right but ı dont know how can i fix this?
This works for me: struct Item1 { public double Foo { get; set; } } struct Item2 { public double Foo { get; set; } } class Program { static void Main(string[] args) { Item1 i1 = new Item1(); CopyDynamically(new Item2 { Foo = 42 }, ref i1); Console.WriteLine(i1.Foo); i1 = CopyDynamically<Item1>(new Item2 { Foo = 3.14 }); Console.WriteLine(i1.Foo); } static void CopyDynamically<T>(object source, ref T target) { if (source == null) throw new ArgumentNullException("source"); if (target == null) throw new ArgumentNullException("target"); foreach (PropertyInfo pi in source.GetType().GetProperties()) { PropertyInfo targetPi = typeof(T).GetProperty(pi.

Categories : C#

Emberjs ,i dont know where take mistake
Have a look here at your working jsbin. Basically I've changed BlogsIndexRoute to BlogsRoute and renamed the blogs template to application. Now it correctly renders the blogs/index template into the application template. I hope this is what you where trying to achieve. Hope it helps.

Categories : Ember Js

Sql pivot - but dont sum the values
Since you are using SQL Server, there are several ways that you can convert the rows of data into columns. You can use an aggregate function with a CASE expression to get the result: select productid, max(case when lower = 0 and upper = 10 then discount end) [0-10], max(case when lower = 10 and upper = 30 then discount end) [10-30], max(case when lower = 30 and upper = 60 then discount end) [30-60], max(case when lower = 60 and upper = 90 then discount end) [60-90], max(case when lower = 90 and upper = 120 then discount end) [90-120] from CorporateSpread group by productid; See SQL Fiddle with Demo. If you are using SQL Server 2005+, then you can use the PIVOT function: select productid, [0-10], [10-30], [30-60], [60-90],[90-120] from ( select productid, discount,

Categories : SQL

Images dont work with css
.header { margin: 0 auto; padding: 0; position: relative; text-align: left; width: 931px; /* make this same width than 'main content'*/ z-index: 10; } in your first divider, style it this way : element.style { /* left: 17%; */ /* remove the left:17% */ position: relative; top: 10px; width: 50%; z-index: 99; } It will align your header and menu

Categories : CSS

Android dont get the whole data
Would you consider using AsyncTask instead of starting a thread manually? Here is a working example of POSTing (vs GET in your question) to a URL: /** * Call a RESTful API to post a json * @param url * @param jsonObject */ private void postJson(URL url, JSONObject jsonObject) { HttpURLConnection conn = null; try { conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("Content-Type", "application/json"); conn.setDoOutput(true); conn.setChunkedStreamingMode(0); conn.setUseCaches(false); OutputStream out = new BufferedOutputStream(conn.getOutputStream()); String jsonString = jsonObject.toString(); Log.i("ArtistRegistrationActivity", "Sending " + jsonString + " to " + conn.getURL().toString());

Categories : Android

Sql Inner Join Dont Have Result
Looks like you want all customer balances regardless whether they have paid anything or not. You have purchases in one table (BORCLAR) and payments in the other table (ODEMELER). I am not sure what language you are speaking, but I guess "MusteriID" is the customer ID. You can use CTEs to get total purchases and payments by customer first and then join on that. Something like this: ;WITH BorclarTotal AS ( SELECT BORCLAR.BorcMusteriID, SUM(BORCLAR.BorcTutari) AS BorcTutari FROM BORCLAR GROUP BY BORCLAR.BorcMusteriID ), OdemelerTotal AS ( SELECT ODEMELER.OdemeMusteriID, SUM(ODEMELER.OdemeTutar) AS OdemeTutar FROM ODEMELER GROUP BY ODEMELER.OdemeMusteriID ) SELECT bt.BorcMusteriID, bt.BorcTutari - ISNULL(ot.OdemeTutar, 0) FROM BorclarTotal bt LE

Categories : SQL

Dont echo if value is a duplicate
Change this: $col = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions(); ?> to this: $col = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions()->addGroupByAttribute('real_colour'); ?> and see if this works.

Categories : PHP

sql statement dont works like i want
Try this way: select distinct t.strKto, (select sum(t1.dblSoll) from tabBuchung t1 where t1.strKto = t.strKto) as oldsaldo, (select sum(tx.dblSoll) from tabBuchungx tx where tx.strKto = t.strKto) as newsaldo from tabBuchung t where t.strKto = '1600'

Categories : SQL

settimeout not working i dont know why
I'm not exactly sure what you are trying to accomplish, but that code won't work. setTimeout() does not pause the function it has been called from, nor does the return statement in the callback affect it.

Categories : Javascript

Delphi dont know about LoadTypeLib?
In Delphi 7, the LoadTypeLib function is declared in the ActiveX unit. You must include that unit in your uses clause. You can find this stuff out for yourself the exact same way that I did it – by searching the source code. Use the Find in Files feature, search for the name of the symbol that is not declared, and search under the Source directory of your Delphi installation.

Categories : Delphi

Eclipse dont show to ADT and SDK
There are many possibilities for this query: 1) First of all please check whether you have installed it correctly: Help --> Install New Software then add this link adt - http://dl-ssl.google.com/android/eclipse/ and read this too 2) try Window > Customize perspective > Command Groups Availability tab. Check the "Android SDK and AVD Manager" option and hit the OK button. If "Android SDK and AVD Manager" hasn't shown up, I think there may be some kind of file miss match in the eclipse. 3) If so, It would be better to start fresh: You can find the step by step guidance here

Categories : Android

4/40 pngs dont show up?
Looks like a compatibility issue similar to this one I had used PS to make all the images but when I open them and resave in PaintBoard then they seem to get picked up now? Upon further inspection it looks like the size has reduced greatly as well now as PS was saving a whole heap of other information with each image. I will go through them all now and resave them just to make the program more economical.

Categories : IOS

Perl regexp tr// "I dont get why it does this?"
"c - is used to specify that the SEARCHLIST character set is complemented" This means that it will replace anything not in the search list with . In your example, the only character not in the search list is a space. Therefore each space gets replaced with a newline. As Schwern pointed out, this is not a good way to do this. "s - is used to specify that the sequences of characters that were transliterated to the same character are squashed down to a single instance of the character" This means that if three characters in a row are translated (resulting in three in a row), the three will be "squashed" into a single . If you added some spaces to your example input, you could see this in action: # Multiple spaces separating words my $str = "a ar? å"; Without squashing:

Categories : Regex

dot dot dot JS plugin dont work
Change Id to class as id is unique and you are appending it inside a loop. {% for object in prispevky %} <article> <h1><a href="novinky/{{ object.id }}/">{{ object.nadpis }}</a></h1> <p class="prispevek">{{ object.text|linebreaksbr }}</p> </article> {% endfor %} Css .prispevek { height:80px; /*text-overflow:ellipsis; overflow:hidden;*/ text-align: justify; } jquery $(document).ready(function() { $(".prispevek").dotdotdot({

Categories : Javascript

Lua dont allow table append
It sounds like what you want to do here, is pass the table to the function that creates D1 and D1.D2 so you can append those values wherever you want them. function addTable(tbl) tbl.D1 = {} tbl.D1.D2 = {'test'} end addTable(A.B) -- now you can call A.B.D1.D2 print(A.B.D1.D2[1]) -- prints 'test'

Categories : Lua

ios: Dont have current location become a pin on map
The "blue dot" is a special annotation, a MKUserLocation. So, in your viewForAnnotation, just add the following two lines at the start to tell iOS to use the standard "blue dot" for the user location annotation: if ([annotation isKindOfClass:[MKUserLocation class]]) return nil; By returning nil, you will tell iOS to use the default "blue dot" annotation for the user location. For an example of this in practice, see the code sample in Creating Annotation Views from Your Delegate Object section of the Location Awareness Programming Guide.

Categories : IOS

JQuery - checkboxes dont't turn on
Try with .prop() like checkAll.click(function(){ checkboxes.prop('checked',this.checked); }); And its better to use even with .on() like checkAll.on('click' , function(){ checkboxes.prop('checked',this.checked); });

Categories : PHP

Some javascript syntax that I dont understand
That's a for-in loop. It looks through the enumerable properties of an object. So for instance, if you have: var obj = { a: 42, b: 27 }; ...then within the loop, file will be "a" on one pass and "b" on another (but the order is not defined). The var in it is just declaring a variable. Note that unlike some other languages, the variable is not limited in scope to just the loop, the declaration is function-wide. The regex, /Spec.js$/, is checking to see if the string ends with "Spec.js". In a regex, $ matches "end of line/input". A backslash is needed before the . because an unescaped . matches any character. More about for-in: ...in the specification. ...on my blog. More about var: ...on my blog.

Categories : Javascript

why dont show me the data ? WINRT
Okay, so what's happening is your GridView is getting the ListaPersonasAgrupada, and then you are changing it, but your GridView doesn't know that it was changed. You need to have your ViewModel tell your GridView that ListaPersonasAgrupada has changed. You can do this with INotifyPropertyChanged. Or, if you're using MvvmLight, you can use RaisePropertyChanged. The other option is to re-set the ItemsSource of the GridView, but that will break the binding.

Categories : C#

Dont understand how views work in ASP.NET
x => x.Name is an anonymous function - it's never executed. In fact, the Html helper casts it as an Expression<Func<TModel, TProperty>>. This is similar to anonymous functions in PHP or passing functions around in JavaScript (Well, Func is, Expression wraps that and allows access to the execution tree of the function - basically tons of metadata about the function itself). Once in the html helper, TextBoxFor, there's a ton of extra processing and comparison of the expression tree against the model metadata. Attributes get factored in and all that is used to build up the HTML (like [Required] or [Scaffold]) Your controller doesn't pass in data, but the view declares a strong model. In the view, @model PartyInvites.Models.GuestResponse does not mean any data is actually pas

Categories : Asp Net Mvc

the code of ajax dont work
The main problem is that xmlhttp is being defined as a global variable, so if you happen to have two AJAX queries loading at the same time, they will interfere with each other. Use var xmlhttp to fix this. That being said, you shouldn't support IE6 and even less so IE5. Just do this: var xhr = new XMLHttpRequest(); xhr.open("GET",url+"?info="+str,true); xhr.onreadystatechange = function() { if( this.readyState == 4 && this.status == 200) { document.getElementById(name).innerHTML = this.responseText; } }; xhr.send();

Categories : PHP

I dont understand the error with the syntax in SQL
Try: INSERT INTO tbproppayh (id_payment) SELECT s.id_payment FROM session.set_values s WHERE id_payment IS NOT NULL; WHERE EXISTS needs a subquery: WHERE EXISTS (SELECT ... FROM ...) See this example. After your comment, just use DISTINCT to avoid inserting duplicate values: INSERT INTO tbproppayh (id_payment) SELECT DISTINCT s.id_payment FROM session.set_values s WHERE id_payment IS NOT NULL;

Categories : SQL

PHP + MySQL - transactions dont rollback
You need to use a transactional database engine. eg INNODB You are currently using MyISAM which does not support transactions. This means you cannot start or rollback transactions without changing your DB engine. MySQL gives instructions on how to convert from MyISAM to INNODB

Categories : PHP

My function dont transmit substr c++
You are trying to bind a temporary, returned by std::string::substr, to a non-const reference. You cannot do that, but you can bind to a const reference: void Object::actionsFace(const std::string &line, int &iteration_face); This will pass a reference to the temporary string, but you cannot modify it inside of the function. Alternatively, you can explicitly make a copy, as with test in your example. Alternatively, if you need a local copy of the string inside your function only, you can pass by value: void Object::actionsFace(std::string line, int &iteration_face);

Categories : C++

Listbox items dont want to stretch
Note, you don't need to set the Horrizontal alignment setting to stretch unless it's in a container that overrides it. By default most XAML controls are set to take up the most space. Also check that your margins are not shrinking your containers below where you want them. (note you can use negative margins to stretch as well)

Categories : Dotnet

PHP sleep function dont work
max_execution_time By default is already 30. If php script is longer then 30, then apache will stop this script. So at first of all, you need make bigger max_execution_time. If your script is longer then 300, then you should use unlimited time for this script. Unlimited execution you can set with set_time_limit(0); You can read this theard too. Execution time problem

Categories : PHP

ng-include dont work on ng-show
I'm not able to recreate this issue. Take a look at this plunker that loads two different templates. (The both look odd, since they're templates stolen from other plunkers to allow for xss). Maybe this issue is caused by the two incomplete div ending tags, that are .

Categories : Javascript

ImageControl dont show in execution
Make sure image build action is set to Resource. (right click on an image and then go to properties, set build action to resource) Also, instead of siteoforigin use application authority - Source="pack://application:,,,/Resources/Trophy-Gold-icon11.png"

Categories : Wpf

php: queue / dont delay the user
You could use exec to start a new php process that runs the script in the background and make sendToQueue return. You could also use a solution like beanstalkD. Where sendtoQueue pushes data to Beanstalk and have workers empty your queue in the background

Categories : PHP

I created an App for Iphone, but i dont want to publish for everybody
I believe that what you are looking for the iOS Developer Enterprise Program, which costs $299 per year. It allows you to distribute iOS apps to employees (or clients in your case).

Categories : Iphone

jQuery .filter() dont work
Your current code will not work for three reasons: You are injecting everything in msg into your element as HTML; .filter only runs after this has happened, so it cannot possibly work. .filter filters items from the matched set of a jQuery object, but tou are not using the result of .filter to do anything so again it would not work. The matched set in this case does not include any #frmCmt element so .filter will evaluate to an "empty" jQuery instance; even if that were somehow used the results would not be what you expected. Change the code to var html = $(msg).find("#frmCmt").html(); $("#commentContainer"+postID).html(html); This code creates a jQuery object from the contents of msg and zeroes in on the required element with .find before inserting it into the DOM.

Categories : Jquery

file_gets_content on the same server, i dont want to get the php code
Using include is a much better solution but if you don't like it, here's an alternative for you. You can use either cURL or file_get_contents() with the actual web url. For example, if your domain name is example.com and the file name is test.php, then you can use this inside another php file - <?php $output = file_get_contents("http://example.com/test.php");

Categories : PHP

java.util.inputMismatchException Dont know why
The inputMismatchException means that the Scanner (input) received something not of int which is expected from nextInt: Thrown by a Scanner to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type. So in short, the next token you give the scanner is not an int.

Categories : Java

Dont terminate program in epoll_wait
You need to either handle signals or block them. If you just want to ignore EINTR I suggest blocking via the sigprocmask() or signal(signum, SIG_IGN) for a single-threaded process, or via pthread_sigmask() for a multithreaded process. If you want to actually do something, use sigaction() to install a handler. Do not use signal() to set an actual handler. Its behavior varies across UNIX platforms. Read the manpages for details.

Categories : C

Updating DB Tables Using PHP Dont Work
You are not passing the userId in the form change <form action='?cpages=users' method='post'> to <form action='?cpages=users&euid=" . $_GET['euid'] . "' method='post'>

Categories : PHP

Dynamically Added Div's dont take events in IE?
I had similar problem for IE and later on narrowed down to IE10 only. To solve try adding background image to the div elements that are not displaying. For some reason it works even if a non-existing image is inserted, so I used one like following. <?php if (preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT'])) {?> <style type="text/css"> .qtip{ background-image:url(/none); } </style> <?php } ?> I have also added a PHP check to implement this CSS only for IE , because other browsers will throw 404 error (and continue to load) for background image. I don't remember where I got this solution from. If I find original link, I'll update the answer.

Categories : PHP



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