Add a new Swift file to your Xcode project. Name it as you please and you should get an alert box asking if you would like to create a bridging header. Note: If you don’t receive a prompt to add a bridging header, you probably declined this message once before and you will have to add the header m...
To find the word foo in the file bar :
grep foo ~/Desktop/bar
To find all lines that do not contain foo in the file bar :
grep –v foo ~/Desktop/bar
To use find all words containing foo in the end (WIldcard Expansion):
grep "*foo" ~/Desktop/bar
When offering IAP within an an app, you must first add an entry for each individual purchase within iTunes Connect. If you’ve ever listed an app for sale in the store, it’s a similar process and includes things like choosing a pricing tier for the purchase. When the user makes a purchase, the App ...
In iTunes Connect, click iTunes Connect in the top left corner of the window to get back to the main menu. Select Users and Roles, then click the Sandbox Testers tab. Click + next to the “Tester” title.
Fill out the information and click Save when you’re done. You can make up a first and last nam...
For an executable file or command exec, running this will list all system calls:
$ ptrace exec
To display specific system calls use -e option:
$ strace -e open exec
To save the output to a file use the -o option:
$ strace -o output exec
To find the system calls an active program uses, us...
HTML:
<ul>
<li>Mango</li>
<li>Book</li>
</ul>
Script:
$( "li" ).each(function( index ) {
console.log( index + ": " + $( this ).text() );
});
A message is thus logged for each item in the list:
0: Mango
1: Book
Many symbols and special characters are required while developing a web page in html, but as we know that sometimes the use of characters directly may interfere with the actual html code which have certain characters reserved and also certain characters being not available on keyboard. Thus, to avoi...
This is continuation of previous example.
Cascading DropDown for country's city name. This method will be called by Jquery when user is done with country selection in parent dropdown. I have followed MVC concept and provided the basic approach for cascading dropdown.
Ajax will call GetCityName met...
GridView is an ASP.NET server control and as such simply requires any version of .Net installed on your computer along with a .Net development environment, typically any version of Visual Studio.
Assuming you have a .Net development environment, create any Web Forms Application or MVC Application p...
The Boolean operators || and && will "short circuit" and not evaluate the second parameter if the first is true or false respectively. This can be used to write short conditionals like:
var x = 10
x == 10 && alert("x is 10")
x == 10 || alert("x is not 1...
import csv
#------ We will write to CSV in this function ------------
def csv_writer(data, path):
#Open CSV file whose path we passed.
with open(path, "wb") as csv_file:
writer = csv.writer(csv_file, delimiter=',')
for line in data:
...
For most of the scenarios involving entities from service layer,we can make do with the default service calls,with some help from the finders as well.For simple scenarios involving multiple entities,we move towards using Dynamic query API.This is a wrapper API for the Criteria API used in Hibernate....
Pseudorandom Distribution
Accorinding to this Stack Overflow answer, user CherryDT pointed out this code:
set /a num=%random% %% 100
does not give a uniform distribution.
The internal dynamic variable %random% does gives a uniform distribution, but the above code will not be a uniformed random...
Step 1: Make a design of GridView for displaying your data (HTML Code):
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
...
You can look at example in Fastjson library
Encode
import com.alibaba.fastjson.JSON;
Group group = new Group();
group.setId(0L);
group.setName("admin");
User guestUser = new User();
guestUser.setId(2L);
guestUser.setName("guest");
User rootUser = new User();
rootU...
/*
Method: To Create Custom Menu
This is First Function to be called when App Loads
*/
function onOpen() {
var ui = SpreadsheetApp.getUi();
// Or DocumentApp or FormApp.
ui.createMenu('My HR')
.addItem('Send Form to All', 'sendIDPForm_All')
.addItem('Trigger IDP System...