Is there such a thing as an "on load complete" for images in iphone?
I want to be able to destroy a UIActivity indicator once and image is loaded.
What the general best practice for doing this?
What would be best practice to localize your ASP .Net MVC application ?
I would like to cover two situations:
one application deployment in IIS which would handle multiple languages
one language / application deployment.
In first situation should you go with somekind of view based thing like, ~/View/EN, ~/View/FI, ~/View/SWE or something different ?
What about second case, just application based config via Web.config and point these different languages to different urls ?
All,
I wonder what is the best practise regarding logging inside a library.
I am creating a C# library to be used by users and at some points I want to log an error or a warning. Is it a good practice to use log4net and log in a file?
Thanks,
M
We keep most of our logs in a dedicated database table. We have written custom appenders for log4j and log4net, have a fixed log schema with lots of handy columns, and are quite happy with it.
Is that the "best practice" (for sites smaller in scale than Facebook, where a simple DB table just won't scale)?
Hey all, what would be best practice for clipping the bottom borders of a Bitmap? Just manipulate the Bitmap itself or overlay an alpha mask drawable or ...?
The whole story:
I've a Listview which looks like the iPhone's grouped UITableView style. I would like to display a Bitmap in the last row, but for now the Bitmap overlaps my custom background drawable of the Listview cell.
Thx in advance!
Using C++, I would like to obtain the DNS servers being used by a host for three operating systems: OS X, FreeBSD, and Windows. I'd like confirmation that the approaches below are indeed best practice, and if not, a superior alternative.
OS X: already answered; updated link at developer.apple.com
Windows: [GetNetworkParms](http://msdn.microsoft.com/en-us/library/aa365968(VS.85).aspx)
FreeBSD: /etc/resolv.conf
Thanks in advance for your help!
I'm using VB's StringBuilder, and I was curious what is considered "best practice" for emptying the builder/setting it to a new string. Would it be something like this:
Dim str As New System.Text.StringBuilder()
str.Append("Some string to remove")
str = new System.Text.StringBuilder()
str.Append("Ahh, fresh new text!")
or is there a "Better" way?
Thanks
The original link of the problem is here: https://code.google.com/codejam/contest/90101/dashboard#s=p2&a=2
In simple words we need to find how many times the string S="welcome to code jam" appears as a sub-sequence of given string S, e.g.
S="welcome to code jam"
T="wweellccoommee to code qps jam"
I know the theory but not good at DP in practice. Would you please explain step-by-step process to solve this DP problem on example and why it works?
I created a few custom templates while modifying a theme (Acquia Prosper), and my usual practice is to put all my templates in this fashion:
theme-name/templates/page/page-front.tpl.php
But it didn't quite work this time. So I'm wondering why. I looked through the templates.php for a clue, but there is nothing there. My base theme where I used this organization was genesis, and in that theme it seems to work, but not in Acquia Prosper.
Can anyone shed some light on this?
I am requesting (via Accept: application/json) that an API I'm designing respond as JSON. However, I want the values within that JSON to be specified to conform to text/plain or text/html depending on the capabilities of the client.
What is the RESTful best practice for a "sub-type"? How would this work if I formally switched to HAL as the top-level container?
Accept: application/json+text/plain
{
"value": "Hello World"
}
Accept: application/json+text/html
{
"value": "<h2>Hello World</h2>"
}
Would like to get a consensus as to what the best practice is in this scenario:
Muliple submit buttons, is it better to handle this by having separate FORMS for each one of the submits, OR is it okay to have one form and check which button was pressed?
thank you for your input :D
Hi
I'm new to Android and web service development!
currently I'm working in developing Android program that will send longitude and latitude information to asp.net website (to show the location change the website map)
the questions are
- how to send this data to the website (the best practice)!
- any suggestions for a suitable framework starting from the android application itself , inserting to database , client/server connection !!
I've read a lot about web services specially REST ..but didn't find tutorials
Appreciate your kind help..
I have a web application running on LAMP with a testing server and a production server. Is there a standard practice for keeping the data on the testing server in sync with the production server? The data on the testing server gets out of date pretty quick and I feel like there must be an easier way than just dumping the production server and copying it onto the testing server every so often. It's not important that the data is in total sync, just that the testing server represents the production enviornment as accurately as possible.
Consider something like:
cat file | command > file
Is this good practice? Could this overwrite the input file as the same time as we are reading it, or is it always read first in memory then piped to second command?
Obviously I can use temp files as intermediary step, but I'm just wondering..
t=$(mktemp)
cat file | command > ${t} && mv ${t} file
I'm currently reading a regularly updated XML file with PHP (simpleXML).
I'd like to reduce calls to the remote server by reading a cache file on my web server, then after some time, retrieving a new copy of the remote file.
Is this an accepted practice for reading remote XML files, then parsing? Can anyone offer some suggestions on how to go about this in PHP, or perhaps there are some PEAR classes that deal with this?
Hello,
I am a computer science Student Second year ,and i know good deal about c++,Data Structure, File Structure,OOP etc.
I decided to learn java i have read couple of books but i know u need practice to master any Programming language so i wonder if anyone could give me the assignments"only the questions not the solution" so that i could solve them as i am getting bored of "hello world"s and "3+2=5"s kinda stuff
thanks,
~HW
Is it generally a good practice to have both view and edit models for an MVC app? Meaning, I wouldn't want validation attributes on a view model since it's basically read-only.
I want to transfer big files (1GB) over unreliable transport channels. When connection is interrupted, I don't want start file transfering from the begining. I can partially store it in a temp table and store last readed position, so when connection is reestablished I can request continue uploading of file from this position. Is there any best-practice for such kind of things. I'm currently use chunking channel.
Simple question - what part of my CSS do I tweak to adjust the gap between a bullet/number and the first text character in an HTML list?
Bonus question - I've seen it mentioned here that controlling table spacing by adjust padding on table tr td {} is bad practice, but I haven't seen someone explain how you're really supposed to do it...?
Hitting play more than once, causes an echo and I can't stop my mp3 player.
What's the best practice for mp3 playback?
var mySound:Sound = new Sound();
playButton.addEventListener (MouseEvent.CLICK, myPlayButtonHandler);
var myChannel:SoundChannel = new SoundChannel();
function myPlayButtonHandler (e:MouseEvent):void {
myChannel = mySound.play();
}
stopButton.addEventListener(MouseEvent.CLICK, onClickStop);
function onClickStop(e:MouseEvent):void{
myChannel.stop();
}
Parametrized components work well with the cake pattern as long as you are only interested in a unique component for each typed component's, example:
trait AComponent[T] {
val a:A[T]
class A[T](implicit mf:Manifest[T]) {
println(mf)
}
}
class App extends AComponent[Int] {
val a = new A[Int]()
}
new App
Now my application requires me to inject an A[Int] and an A[String], obviously scala's type system doesn't allow me to extends AComponent twice. What is the common practice in this situation ?
Hi,
I know you're supposed to only load log4j properties once, so what is standard practice when you're doing unit tests? Should I load it in every unit test file? Should I put it in jUnit's setUp() method?
Thanks
I have a asp.net master page that gets used by pages many /levels/deep/
I will put a link to a flash file in this template.
I tried doing it like this but it did not work, what the best practice here?
<object width="924" height="200">
<param name="movie" value="/live.swf">
<embed src="/live.swf" width="924" height="200">
</object>
I am looking for a Java equivalent to .NET's Snippet Compiler. Is there any such utility out there? That or a really light weight Java IDE for Windows? Eclipse and NetBeans seem too heavy-weight to practice basic syntax.