[Solved] How to change the ClientRect of a form?

type TForm1 = class(TForm) .. private procedure WmNCCalcSize(var Msg: TWMNCCalcSize); message WM_NCCALCSIZE; .. .. procedure TForm1.WmNCCalcSize(var Msg: TWMNCCalcSize); begin inherited; if Msg.CalcValidRects then begin InflateRect(Msg.CalcSize_Params.rgrc[0], -10, -6); Msg.Result := 0; end; end; Please, carefully read WM_NCCALCSIZE‘s documentation though, including the remarks section and also NCCALCSIZE_PARAMS, as I’m not sure this is what you want. But … Read more

[Solved] Why in OOP you do everything in objects? [closed]

You choose object-oriented programming when encapsulating data and behavior into classes, whose instances, maps well onto the problem you’re trying to solve. Not every problem is best done with objects. There are other styles of programming – functional and declarative come to mind – that are also good. Most of the scientific programming that I … Read more

[Solved] SQL group data based on a column and pivot rows to (unknown) columns [duplicate]

A straight-up PIVOT in concert row_number() with should do the trick Select * From ( Select ID = fd_Interpretation ,Item = concat(‘Word’,row_number() over (partition by fd_Interpretation order by fd_Word) ) ,Value = fd_Word From YourTable ) src Pivot ( max( Value ) for Item in ([Word1],[Word2],[Word3],[Word4],[Word5],[Word6],[Word7],[Word8]) ) pvt 2 solved SQL group data based on … Read more

[Solved] Cannot open excel files from Eclipse STS

I had chosen the wrong excel “tool” in eclipse to open xls files. Here is the solution : Eclipse > right click the xls file > open with > other > select “Microsoft Excel Binary Worksheet” > check “use it for all *.xls files” > ok. Now the excel files will be opened directly from … Read more

[Solved] accuracy of sinl and cosl function in c++

Do not use the value pi = 22 / 7 if you want accuracy. Please use M_PI which is defined in math.h. In MSVC you also need #define _USE_MATH_DEFINES to make the following values available. #define M_E 2.71828182845904523536 // e #define M_LOG2E 1.44269504088896340736 // log2(e) #define M_LOG10E 0.434294481903251827651 // log10(e) #define M_LN2 0.693147180559945309417 // ln(2) … Read more

[Solved] CSS Random space between elements

Your <video> is a inline element which has a vertical-align by default (baseline). You can either vertical-align it with middle or easier make all <video>s block elements: video { display: block; } http://jsfiddle.net/Atup4/ 0 solved CSS Random space between elements

[Solved] SEO optimization of Angular.JS project [closed]

First of all, you should form title meta tags and description. const metaTags = { get(metaTagName) { switch (metaTagName) { case `titleMeta`: return angular.element(`meta[property=”og:title”]`); case `descriptionMeta`: return angular.element(`meta[property=”og:description”], meta[name=”description”]`); } } } Now, you have to create the function which will receive our title in a form of string through the parameters. const metaTags = … Read more

[Solved] Swift Array append not appending values but replacing it

There is not enough information but I can guess you where you have made mistake. Your class Bookmark is not singleton class so,every time Bookmark() create new instance every time. that means it will create new bookmark object for every instance. What I suggest you is inside func func setBookmark(imageURL:String, title:String, description:String, summary:String, date:String, link:String) … Read more

[Solved] How can I foreach this array object?

Here You go: <?php $list = (object)[]; $list->egame = [ (object)[‘platform_name’=>’TT’, ‘game’=>(object)[(object)[‘game_name’=>’game1’, ‘info’=>’test1’],(object)[‘game_name’=>’game2’, ‘info’=>’test2’],(object)[‘game_name’=>’game3’, ‘info’=>’test3’]]], (object)[‘platform_name’=>’TG’, ‘game’=>(object)[(object)[‘game_name’=>’game4’, ‘info’=>’test4’],(object)[‘game_name’=>’game5’, ‘info’=>’test5’]]], (object)[‘platform_name’=>’TBIN’, ‘game’=>(object)[(object)[‘game_name’=>’game6’, ‘info’=>’test6’]]] ]; foreach ( $list->egame as $eg ) { foreach ( $eg->game as $game ) { echo “game: ” . $game->game_name . ” info: ” . $game->info . “<br>”; } } ?> Edit #1 … Read more

[Solved] I can’t seem figure out how to update my last inlog time [duplicate]

In your query here: UPDATE users_table SET ‘date_last_inlog’ = NOW() WHERE user_name=”$user_name” Try removing the quotes around date_last_inlog or changing them to backticks: UPDATE users_table SET date_last_inlog = NOW() WHERE user_name=”$user_name” Also, don’t use the mysql_* functions, use mysqli or PDO instead. Your code is vulnerable to SQL Injection. 9 solved I can’t seem figure … Read more

[Solved] How to stop form submission if email address is already available in MySQL db ? [closed]

To achieve this you will need ajax, you have two options on the username field you can have an onblur event, then call a function that will check the username in the database using the onblur event. <input name=”username” type=”text” id=”username” onBlur=”checkAvailability()”> The onblur event occurs when an object loses focus. The onblur event is … Read more