I have table called emp, the table contains three empid,ename and salary. I have to store the empid as autogenerated id ex:E001,E002,E003, how can i do that using c#?
I tried the tool wsdl2java from axis2, but looks something wrong with the XML Java class binding, so when making the call, a ADBException (adb binding used) will be thrown out.
can someone kindly tell the bet tool/way to generate can-work client code from such style of wsdl file (standard .net style:document literal wrapped)?
Thanks.
While i'm sure i can write a CRON to do this and some how open the ports on a network hd in my house, to be honest i'd rather spend a bit of money on some good software with a nice visual interface!
are there any such all-in-one server backup systems?
nightly backups of the MYSQL db
weekly backups of entire site (images etc)
my server is a VPS hosted by https://www.memset.com.
I recently wrote, my first, WPF application that has a list of items that are polled from a web-serivce. The items are displayed/data-bound in a ListView via a GridView. A background thread periodically polls the web-serivce and updates the list.
If, say, I had three items initially bound to the ListView that simply display a description and the three descriptions where something like:
- ProjectA
- ProjectB
- ProjectC
Later a new item is added with a description of 'AReallyReallyLongProjectName', I would end up with a list like:
- ProjectA
- ProjectB
- ProjectC
- AReallyR
The GridViewColumn would not update it's width and would subsequently cut off any new items that extended the original width.
I added this bit of code which forces the column to resize, but it just seems a little hacky. (Just seems weird to set a width just to set it back to nothing to force the resize)
if(gridView != null) {
foreach(var column in gridView.Columns) {
if (double.IsNaN(column.Width) column.Width = column.ActualWidth;
column.Width = double.NaN;
}
}
Is there a better, more elegant solution, to accomplish this same thing?
Inside of my QGraphicsRectItem::paint(), I am trying to draw the name of the item within its rect(). However, for each of the different items, they can be of variable width and similarly names can be of variable length.
Currently I am starting with a maximum font size, checking if it fits and decrementing it until I find a font size that fits. So far, I haven't been able to find a quick and easy way to do this. Is there a better, or more efficient way to do this?
Thanks!
void checkFontSize(QPainter *painter, const QString& name) {
// check the font size - need a better algorithm... this could take awhile
while (painter->fontMetrics().width(name) > rect().width()) {
int newsize = painter->font().pointSize() - 1;
painter->setFont(QFont(painter->font().family(), newsize));
}
}
I'm pretty sure I saw an example where the graph wasn't filling the whole iPhone screen, but I can't get that to happen in my app, nor in the Core-Plot Test app from Switch On The Code.
I've added a subview to the original CPLayerHostingView in the sample, then changed the classes – original back to UIView, new subview to CPLayerHostingView, and I've reconnected the File's owner's view outlet to the new subview.
When I create a graph with:
graph = [[CPXYGraph alloc] initWithFrame: theSubviewOutlet.bounds];
… and step through the first stages of building up the layers the bounds are accurate (i.e. the same as in the .xib)
however, when all the initialization is done, and the graph shows up, it fills the whole superview.
Am I missing something obvious?
I'd like to have the width of my table 100% of screen width - so flexible to different screen sizes.
is it possible to have my columns automatically resize proportionately?
I've tried give the td's percentage widths but this doesnt seem to work, firebug shows that the tbody isnt filling the tables width?
<table class="">
<tr class="headings">
<td class="entry">
</td>
<td class="calendar">Availability Calendar
</td>
<td class="deals">Last Minute Deals
</td>
<td class="ann">Announcements
</td>
<td class="banners">Banners
</td>
</tr>
</table>
I want to develop a module to implement such a feature:
when exchange receive emails in the mailbox : [email protected]
the module will be triggered and modify the email's TO Address to /test/@smb.local and save back to mailbox [email protected].
Thanks in advance!
I'm sorry to ask this here, as I'm sure the solution is fairly easy but for the life of my I can't setup httpd.conf on my apache server to automatically load the code_igniter files.
Instead I'm having to go into the folder itself localhost/trunk/etc/etc until I get index.php - which messes with some of the relative paths (our backend coder is gone for the week so I can't ask him, but he has already setup the rewrite rules on our development server).
I have table called emp. The table contains three XXXX empid, ename and salary. I have to store the empid as autogenerated ids, for example: E001, E002, E003. How can I do that using C#?
Contrary to this question this is for a dotted name (gw.localnet.au), and it doesn't happen straight away. Only after some period of time (quite a long time, possibly days).
In fact this is for my ADSL router and its internal IP address which I have named within the router itself and in my Windows Server 2003 Domain Controller DNS Service. Specifically, localnet.au is a Active-Directory-backed primary domain.
In fact, an ipconfig /flushdns may fix the problem, but only after a while (about the time it took me to type in this question :-) ).
That doesn't explain the root cause though...
<Button Name="MyButton" Content="Test" FontStyle="Italic" />
In the above XAML definition of a button, the FontStyle property is set to Italic. The designer is somehow able to populate a list for me to choose from when I hit the = sign. How is this achieved?
Before you answer, consider that the FontStyle property is, appropriately enough, of type FontStyle (which is a struct). It's not an enumeration, which would be trivial for VS to list out at design time, so how are the valid list of options chosen to be displayed? There is also a completely separate FontStyles class which contains three static fields, Italic, Normal, and Oblique which just so happen to be the three items VS provides in the drop down list. Is there some mapping going on behind the scenes between the FontStyle struct and FontStyles class, because I've looked in many places in both the object browser and in .NET Reflector and couldn't determine anything from either.
Thanks!!
I NEED to know!*
*Not really, but it would be nice to :)
In an Android application, we usually got the "Force Closed" error if we didn't get the exceptions right.
How can I restart my application automatically if it force closed?
Is there any specific permission is used for this?
How do I stop VS 2010 (RC) from autocompleting html helpers with new object { ... } when I just want to pass in an anonymous type? Backspacing is driving me crazy.
e.g., VS wants:
<%=Html.ActionLink("Register", "Register", new object { controller = "Account" }) %>
I know the helper is declared expecting object, which is why it does this, but can I change this behavior just for mvc helpers?
We noticed that on W7 with DPI set to 125% or to 100% with ("Use windows xp style dpi scaling") turned off, our fullscreen mode (which sets the client rect of our window = desktop rect of the main monitor) no longer hides the task bar like it does for other settings.
(The setting can be found in the Control Panel\Appearance and Personalization\Display section after clicking on the "Set custom text size (DPI)" link)
I found the following interesting article:
http://www.mathies.com/weblog/?p=908
So I set out to try to work around the bug in other means than manually hiding/restoring the taskbar visibility but so far I've failed and currently believe it's a bug in W7 (and possibly vista).
The following applications also fail to work properly in fullscreen mode (the taskbar is still visible):
* Microsoft Visual Studio 2008
* Microsoft Word 2007
* Adobe Reader 9.1.3
These apps work (probably by hiding the task bar through the WIN32 API):
* Powerpoint Slide Show
I also tried creating a brand new MFC-based app and use its "SetFullScreenMode()" functionality but it fails in the same way as all other apps on the list.
Does anyone know of a workaround?
Thanks,
Per
Hi,
image a complete black web page. On this web page is a 100% size white div that fills the whole page. I'd like to rotate this div by -7 degrees (or 7 degrees counter-clock wise).
This will result in the black background being visible in triangles on the edges, just like you had placed a piece of paper on a desk and turned it a bit to the left.
Actually this can be done with some css and it's working quite well (except for IE).
The real problem now is:
I'd like to have a normal, non-rotated div element on top of that to display the content in, so that only the background is rotated.
Rotating a contained div counterwise doesn't work though, because through the two transformations the text will be blurry in all browsers.
How can I realize that?
Best would be a solution workiing in current Webkit browsers, FF3.5+ and IE7+. If only IE8+ I could live with that too.
Hey guys,
i've got 2 GeoPoints given to show them on the map with markers...
so far so good...
how can I get the optimum zoom level for the MapController in order to focus the middle of both points, but also have them on the map.
The whole thing should work at different screen resolutions.
Sorry for asking that silly question, I know thats not very difficult, but at the moment my head is boiling :/
Hi,
i have a container div which is position:relative and the squares are position:absolute because i want to play with their positions.
Like what you see, the container does not fit the content except if the squares are positioned in Relative, is there a solution for this?
I don't want to just set the height for container because the squares are not static so i want something that resizes automatically.
Thanks
I'd like for my chrome extension to reload every time I save a file in the extension folder, without having to explicitly click "reload" in chrome://extensions/. Is this possible?
I know that you can press shift+alt+j to insert an appropriate comment template for the current code block, but is there any way to let eclipse just go crazy and do a whole project like this?
Say I have a bunch of boolean properties on my entity class public bool isActive etc. Values which will be manipulated by setting check boxes in a web application. I will ONLY be posting back the one changed name/value pair and the primary key at a time, say { isActive : true , NewsPageID: 34 } and the default model binder will create a NewsPage object with only those two properties set. Now if I run the below code it will not only update the values for the properties that have been set on the NewsPage object created by the model binder but of course also attempt to null all the other non set values for the existent entity object because they are not set on NewsPage object created by the model binder.
Is it possible to somehow tell entity framework not to look at the properties that are set to null and attempt to persist those changes back to the retrieved entity object and hence database ? Perhaps there's some code I can write that will only utilize the non-null values and their property names on the NewsPage object created by model binder and only attempt to update those particular properties ?
[HttpPost]
public PartialViewResult SaveNews(NewsPage Np)
{
Np.ModifyDate = DateTime.Now;
_db.NewsPages.Attach(Np);
_db.ObjectStateManager.ChangeObjectState(Np, System.Data.EntityState.Modified);
_db.SaveChanges();
_db.Dispose();
return PartialView("MonthNewsData");
}
I can of course do something like below, but I have a feeling it's not the optimal solution. Especially considering that I have like 6 boolean properties that I need to set.
[HttpPost]
public PartialViewResult SaveNews(int NewsPageID, bool isActive, bool isOnFrontPage)
{
if (isActive != null) { //Get entity and update this property }
if (isOnFontPage != null) { //Get entity and update this property }
}
Hey!
I tried to find a solution but I didn't found what I was searching for. So here is my problem.
I want a google like behaviour with a textbox. As I type "dum" it should find dummy in the database and display it as option under the textbox. It should be selectable.
I don't use ASP.net or any other stuff. Just pure C#.
Thanks for your help!
I am switching to Clojurebox to edit my clojure files. However I can't get the automatic alignment to work. I want the cursor to move two spaces after the line that I am editing when I hit return.
I use to program mainly with C/C++, that's make me dealing with pointers and memory management daily. This days I'm trying to develop using other tools, such as Java, Python and Ruby.
The problem is that I keep thinking C++ style, I'm writing code as C++ usually written in almost every programming language, and the biggest problem is the memory management, I keep writing bad code using references in Java and just get as close as I can to the C++ style.
So I need 2 thinks here, one is to trust the garbage collector, let's say by seeing benchmarks and proofs that it's realy working in Java, and know what I should never do in order to get my code the best way it can be.
And the second think is knowing how to write other languages code. I mean I know what to do, I'm just never write the code as most Java or Python programmers usually do, are there any books for C++ programmers just to introduce me to the writing conventions?
(by the way, forgive me for my English mistakes)
Hello,
In my tables, i have selected id column to be of type int (4 bytes). The answer i want to know is how will any database handle it once it's limits are reached? Will the database refuse to insert any more records in table? or what exactly will happen? Also how should i tackle this type of problem (if the database doesn't handle it by itself)?