Posts

c++ - work with .hpp files -

The code in my main program is given below; Here I have inserted a file named test.dat and the data of this file in my structure so that I can use the square named mydata (http: // my_data.hpp). int main () {// cout & lt; & Lt; "This is my program" & lt; & Lt; Endl; // When removing this, the codes are not working exactly = true; MyData my_data ("test.dat", okay); If (OK == wrong) {cout For the calculation part, I used another class, acalakulation (a_calculation.hpp). Here I had indicated to speed up my program. Computation (MyData * my_data) {MYData :: iterator i; (I = my_data - & gt; Start (); i! = My_data -> End (); i ++) {If (i-> A ()> gt; Max) {max = I- & Gt; a (); }} Cout & lt; & Lt; One ???? My maximum value is: A ???? & Lt; & Lt; Max; My program does not show any errors, but when I run it, it does not show the result of my maximum value. But when I added a single ??? Coutâ ???? The code shows t...

user interface - Asking for advice for UI of multiplayer card game (Android) -

Image
OK, so 4-6 players can be what I want to put around a circular table (table is just a Background i think). My problem is because each player can have multiple cards (up to 10), I like that the user will always appear below with his card, and the remaining players will see it with a hidden card. Now, a player can join the table if he has room, then I need to adjust to sit accordingly, if any player clicks the top left join button, when he starts playing, then I He should look for himself. How can I do this? I think that is not the right way to keep static thoughts, I have attached a scratch image of my wish UI. The players' thoughts can be just their cards in the foreground of the screen. She sees the table from the first person. There will be 2 ideas for another approach, 1 will be with the observation of the table and one will be the second to see the card etc. Users who can switch between me privately I prefer first. To create the first I will make the layout horiz...

c# - Problem with grid when trying to use groupby in LINQ -

When you try to use GROUPBY, I get an error that states that the field 'date1' is selected Not found on the resource. var query = (Select from db.bt to db.Facts where a.Count_Key == b.Date_key new {a.Date1, a.Month, b.Fact_key} ); Var query2 = query.GroupBy (x => x.Month); Grid1.DataSource = query2; Grid1.DataBind (); Therefore, when I try to bind the query it works perfectly, but the query generates 2 errors field date1 Not found on the selected data source. How can I fix this? The group names different from the original selection by return column. You can do the following to see it for "educational purpose". Create a new grid 2 and use it with automatic columnmapping. Divide question 2 into this grid 2 and you will see the result.

What is the most efficient and robust way to program ASP.NET with javascript? -

I wanted to know what is the best way to program ASP.NET with JS? So far, I am trying to code with codebehind features. Add ("onclick," ....); Is there a better and better way to use JS with ASP.NET? Thank you Writing all your functions in a different JS file is more flexible Now what are you doing The problem may be the control ID in your JS file. Okay, there are many ways. Hardcoding Just look at the Source View and Identify Control which you want to use. It's easy, but if you want to change the control ID some time then the related function will not work something like that all in the ASPX file Announce a variable with client id that uses in JS file var MyControlIDs = {"Textbox1": "& lt;% = Textbox1.ClientID%>", " Label1 ":" & lt;% = Label1.ClentID%> "}; and in your JS file var mycontrol = window .MyControlIDs and anywhere you want var textbox = document .getElementById (mycontrol.T...

CouchDB Blog Application -

I have read many articles on "CouchDB - Definitive Guide" and on the Web I understood how the couch works, but Some questions are still in my mind. To work on a simple blog application: I want to show the post data and the author's data in the post page. So I think I have to give everything in the same document. Fine. If I need to show only the author's data in a page, then I can do it with a view okay. But if the author updates his data, then I need to update every document where the authors appear? Or am I wrong? I love to understand this argument. Thanks in advance. Some information can be left in the same document, and in most cases that will work just fine. {"title": "Blog Article Title", "Content": "... Blah Blah Blow ...", "Author": {"Name": "Some Guys" , "Email": "someguy@foo.bar"}, "type": "post"} The second time you create a li...

Preserving Ajax page state with URL hash -

On my site there is a page with two sets of tabs, each tab is linked to AJAX but it has proper href The matter is not Javascript enabled. I am using a plugin like implementing an AJAX 'back-button' solution, such as a jQuery address. My problem with this problem / confusion is that the default content of the first page of Javascript has still been loaded, parsing the hash and the chance to load the correct content, if I initially hide the content, Non-JavaScript users will never see anything. If I do not initially hide the content, then the user will see the wrong page before it gets updated (in addition to loading the wrong tab, except the overhead and then the right tab). If you use a hash , You'll always have the wrong content to avoid this, you have to use a server-side solution with the HTML5 History API. You can use: and present the tab with something like the on the server side (if $ _GET ['tab'] === '2 ') / / Render2

c# - convert ushort[] grayscale values to byte[] -

I have the value 0-65536 in the format uhort [] . But I need this grayscale values ​​in the byte form! How do I change my user values ​​in byte values? Thanks byte value = (byte) (array [index ]> 8);