Questions

Undefined symbols for architecture arm64

I am getting a Apple Mach-O Linker Error everytime I import a file from CocoaPods. ``` Undefined symbols for architecture arm64: "_OBJC_CLASS_$_FBSession", referenced from: someFile ld: symbol(s) n...

12 May at 15:42

How to run function in AngularJS controller on document ready?

I have a function within my angular controller, I'd like this function to be run on document ready but I noticed that angular runs it as the dom is created. ``` function myController($scope) { ...

31 May at 01:19

How can I hide an element using Twitter Bootstrap and show it using jQuery?

Let's say I create an HTML element like this, ``` <div id="my-div" class="hidden">Hello, TB3</div> <div id="my-div" class="hide">Hello, TB4</div> <div id="my-div" class="d-none">Hello, TB4</div> ``` ...

How to write a foreach in SQL Server?

I am trying to achieve something along the lines of a for-each, where I would like to take the Ids of a returned select statement and use each of them. ``` DECLARE @i int DECLARE @PractitionerId int D...

16 Sep at 22:38

Push existing project into Github

I have a folder with my project sources. How I can push this project into Github's repository? I tried using this steps: 1. I created empty repository on GitHub. 2. I run git-bash and typed git in...

25 Jun at 07:54

Spring MVC: Complex object as GET @RequestParam

Suppose i have a page that lists the objects on a table and i need to put a form to filter the table. The filter is sent as an Ajax GET to an URL like that: [http://foo.com/system/controller/action?pa...

5 Jun at 14:10

How to create a table from select query result in SQL Server 2008

I want to create a table from select query result in SQL Server, I tried ``` create table temp AS select..... ``` but I got an error > Incorrect syntax near the keyword 'AS'

22 May at 05:5

How to output loop.counter in python jinja template?

I want to be able to output the current loop iteration to my template. According to [the docs](https://jinja.palletsprojects.com/en/3.0.x/templates/), there is a `loop.counter` variable that I am tryi...

24 Dec at 03:26

Git push error: Unable to unlink old (Permission denied)

In the remote server I have a post-receive hook set up in order to make a git checkout of my repository: ``` #!/bin/sh GIT_WORK_TREE=/var/www/<website> git checkout -f ``` But when I make a push fr...

23 Jan at 05:49

Nodejs cannot find installed module on Windows

I am learning nodejs at the moment on Windows. Several modules are installed globally with npm.cmd, and nodejs failed to find the installed modules. Take jade for example, ``` npm install jade -g ```...

25 Apr at 15:23

Execute a command without keeping it in history

When doing software development, there is often need to include confidential information in command line commands. Typical example is setting credentials for deploying the project to a server as envir...

13 Dec at 10:34

Looping over arrays, printing both index and value

I want to do something like this: ``` foo=( ) foo[0]="bar" foo[35]="baz" for((i=0;i<${#foo[@]};i++)) do echo "$i: ${foo[$i]}" done # Output: # 0: bar # 1: ``` Then i tried to loop through it us...

17 Jul at 11:9

How do I make CMake output into a 'bin' dir?

I'm currently constructing a project with a plugin structure. I'm using CMake to compile the project. The plugins are compiled in separate directories. My problem is that CMake compiles and saves the ...

3 Sep at 09:20

Setting the MySQL root user password on OS X

I just installed MySQL on Mac OS X. The next step was setting the root user password, so I did this next: 1. Launch the terminal app to access the Unix command line. 2. Under the Unix prompt I execut...

31 Dec at 19:7

Create a new database with MySQL Workbench

Being new to MySQL, I have installed the latest version of the MySQL Workbench (5.2.33). I would like to know how you can create a database with this application. In the Overview tab of the SQL editor...

4 Mar at 16:42

Regex Email validation

I use this ``` @"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$" ``` regexp to validate the email `([\w\.\-]+)` - this is for the first-level domain (many letters and numbers, also point and hyphen) `([\...

23 Sep at 07:33

What's the best way to share data between activities?

I have one activity which is the main activity used throughout the app and it has a number of variables. I have two other activities which I would like to be able to use the data from the first activi...

28 Dec at 16:57

Placing/Overlapping(z-index) a view above another view in android

I have a linear layout which consists of imageview and textview , one below another in a linear layout. ``` <LinearLayout android:orientation="horizontal" ... > <ImageView android:id="@+id...

24 Jul at 08:3

Bold & Non-Bold Text In A Single UILabel?

How would it be possible to include both bold and non-bold text in a uiLabel? I'd rather not use a UIWebView.. I've also read this may be possible using NSAttributedString but I have no idea how to u...

Test if a property is available on a dynamic variable

My situation is very simple. Somewhere in my code I have this: ``` dynamic myVariable = GetDataThatLooksVerySimilarButNotTheSame(); //How to do this? if (myVariable.MyProperty.Exists) //Do stuff ...

7 Oct at 17:28

How to use MySQLdb with Python and Django in OSX 10.6?

This is a much discussed issue for OSX 10.6 users, but I haven't been able to find a solution that works. Here's my setup: Python 2.6.1 64bit Django 1.2.1 MySQL 5.1.47 osx10.6 64bit I create a virtu...

Proper MIME type for OTF fonts

Searching the web, I find heaps of different suggestions for what the proper MIME type for a font is, but I have yet to try any MIME type that rids me of a Chrome warning such as the following: > Res...

15 Jul at 19:44

Get name of property as a string

(See below solution I created using the answer I accepted) I'm trying to improve the maintainability of some code involving reflection. The app has a .NET Remoting interface exposing (among other thin...

30 Aug at 11:57

How to shutdown an app deployed on Heroku?

I have an app on Heroku which is being used by few users. However, I notice there are some data issues which I'd like to fix and stop the app in the mean time so users don't enter anything new. Is the...

21 Aug at 15:16

How to find patterns across multiple lines using grep?

I want to find files that have "abc" AND "efg" in that order, and those two strings are on different lines in that file. Eg: a file with content: ``` blah blah.. blah blah.. blah abc blah blah blah.....

3 Sep at 19:43