Final Term Papers 2014 and 2015: BS110401050 AKMP01
Final Term Papers 2014 and 2015: BS110401050 AKMP01
Q1: Which event combines information from independent touch devices updating simultaneously and package data in
an easy-to-consume form?
Answer: To undo filtering, you can set the Filter property to null:
Nothing will happen
Filer:{category:null}
Q3: Selectors and declarations are two blocks of which website layer?
Q5: How you refresh current page in WPF Navigation based application?
Answer: This.navigationservice.Refresh();
Answer: By utilizing the XML or Object data providers, we can bind to different types of objects in
our applications
ObjectDataProvider provides a convenient way to create and use objects as binding source objects in
XAML
ObjectDataProvider enables you to create your object in XAML and make it available as a binding
source. It provides the following properties that enable you to execute a query on your object and bind
to the results.
Use the ConstructorParameters property to pass parameters to the constructor of your object.
Use the MethodName property to call a method and use the MethodParameters property to pass
parameters to the method. You can then bind to the results of the method.
Answer:
Ajax interactions can be used to do things such as validate form entries (while the user is entering
them) using server-side logic, retrieve detailed data from the server, dynamically update data on a
page, and submit partial forms from the page.
5 mark Questions:
Q9: Describe purpose of using navigation in page in one line? And how we perform navigation?
Answer: Navigation means managing the current item, not the other kind of nav. navigation in three
main ways: Calling the Navigate method, Using Hyperlinks, Using the journal.
Q11: When browser sends request to web server, in which formats server sends back information to
web server? Give 4 examples?
Answer: Web servers receive request and responds as Html, plain text and XML, JSON
Q12: Ali wants to bind the entire set of XML data to Tree n Menue write the code?
Answer: localizing binary resources. Can partition into satellite assembly and use locbaml to manage
string localization. To spec. A default culture and auto. Build a satellite assembly, you can to set
uiculture. Need to open project file in a text ed. Add under debug, release etc. Or where it effects all
prop. If you rebuild your project with this setting in place, youll find an en-US folder alongside your
assembly, containing the satellite assembly named assemblyname.resources.dll. Also mark assembly
with the neutral resource language matching.
<Project >
<propertygroup>
<uiculture>en-US</uiculture>
[assembly: neutralresourceslanguage("en-US",
Ultimateresourcefallbacklocation.Satellite)]
Next, apply Uid directive to any element needing localization. Msbuild /t:updateuid
projectname.csproj. Locbaml /parse projectname.g.en-US.resources /out:en-US.csv. Now edit and
localize all strings. Locbaml /generate Project-Name.resources.dll /trans:fr-CA.csv /cul:fr-CA. Then
copy the assembly with a name matching the locale. To test,
System.Threading.Thread.currentthread.currentuiculture (and
System.Threading.Thread.currentthread.currentculture) to an instance of the desired cultureinfo.
Q16: Ali wants to select and hide all <p>tags from html. Give syntax for this in JavaScript and
JQuery?
Answer:
The jquery simplifies all steps except that of changing the webpage simplest is load function which
loads HTML into an area of web page e.g. Load news in a div from a web-server
$(’#headlines’).load(’todays news.html’); can only load from same site... Relative urls possible to add
only a part $(’#headlines’).load(’todays news.html #news’);.
Answer:
JS, server-side programming, and web browser, all work together. Web browser: xmlhttprequest
object. Makes ajax possible. Talks to web server and get response. JS: sends request, waits for
response, process response, updates web page. Web server: receives request and responds as HTML,
plain text, XML, JSON. Or application server for more complicated tasks. Need web server for ajax
examples.
Q19: binding
Answer: In last lecture, we discused data binding, binding object, markup extension, bind to any prop
with inotifypropertychanged, target must be dependency property, bind to obj. So no property path,
binding to collection, issynchronized with current item, datacontext, displaymemberpath,
stringformat, datatemplate, valueconverter.
Q21: Choose selected data items i.e target items just like last 7 days pictures?
Answer: Filtering gives a property Filter of type Predicate¡Object¿. Its null by default e.g. Show only
photos from last 7 days.
Answer:
The code $('li:has(a)') matches a <li> if a <a> exists anywhere among its descendants, not just as a
direct child.
Q23: How can we present a window from automatically being activated when its is first show?
Answer: There are Activated & Deactivated events. Activate method (like setforegroundwindow).
Showactivated=false, initially not shown
Public static void Main()
{
Mainwindow window = new mainwindow();
Window.Show();
}
Answer: Long running operations make application unresponsive. Because main thread used for
rendering UI and responding to events. Start up worker thread and update UI when finished. But UI
updation usually possible only on UI thread. So, forward the request to UI thread.(or marshal it). Low
level way is to call begininvoke or Invoke on the elements Dispatcher object. It takes a delegate and
queues it on the UI thread. Invoke does same but then blocks until it is done. So you can return a
value. But if you dont need begininvoke is better.
Q25: Identify client side languages and server side languages cold fusion, asp.net, java script and php?
Answer: Freeing or overwriting data that is still in use. This causes memory corruption, and typically
results in your application crashing, or worse, corrupted user data.
Not freeing data that is no longer in use causes memory leaks. A memory leak is where allocated
memory is not freed, even though it is never used again. Leaks cause your application to use ever-
increasing amounts of memory, which in turn may result in poor system performance or (in iOS) your
application being terminated.
Q29: What is the technique used in Cocoa framework for memory management.
Answer:
Cocoa framework use reference counting model for memory management
Q30: When using navigation in WPF, content is typically organized in which element?
Q31: why we write navigation in one line line in a web page? syntax of navigation?
Answer: Commands are a more abstract and loosely coupled version of events e.g. cut copy paste
commands. They are exposed in various ways. They can be enabled disabled e.g. if there is nothing to
paste.
Q34: identify Application commands and component commands:
close
help
move to right
find
select to end
Answer:
Application commands: close , help, find
Q35: which property tells the location manager about how accurate the location finding should be?
And why the accuracy is important?
Answer:
Set the variable referencing to that object to nil.
Or
Destroy using [array Instance release]; Should also array Instance = nil; Otherwise dangling. but
Sending message to nil is ok. nil is like null
Q37: Does Java script have any connection with java or not. Give valid reason?
Answer:
No connection with java
Actually java was popular before invention of JavaScript..... The first name of JavaScript was not
JavaScript.... Due to popularity of java.... that new language change its name to JavaScript
Answer:
JS has nothing to do with Java, originally named LiveScript but renamed to associate with the then hot
Java
Q39: Media Commands, Navigation Commands, Editing Commands, application commands and
components commands?
ApplicationCommands
MediaCommands
NavigationCommands
e.g. BrowseBack,
BrowseForward, BrowseHome, BrowseStop, Favorites, FirstPage, GoToPage, LastPage, NextPage,
PreviousPage, Refresh,
Search, Zoom, and more.
EditingCommands
Answer:
Build a satellite assembly, you can to set UICulture. Need to open project file in a text ed. add under
debug, release etc. or where it effects all prop.
Answer:
Answer:
Difference b/w hover() and toggle() is that toggle() works by clicking it on and off whereas hover()
works just by positioning the mouse over it.
Answer:
There are times when you want to invoke a delegate and wait for its execution to complete before the
current thread continues. In those cases the Invoke call is what you want.
In multi-threading applications, you may not want a thread to wait on a delegate to finish execution,
especially if that delegate performs I/O (which could make the delegate and your thread block). In
those cases the BeginInvoke would be useful.
Q45: what is difference between server Side programming and Client Side Programming? (3
Marks)
Answer:
Server-side programming is the general name for the kinds of programs which are run on the Server.
Uses
Process user input.
Display pages.
Structure web applications.
Interact with permanent storage (SQL, files).
Much like the server-side, Client-side programming is the name for all of the programs which are run
on the Client.
Uses
Make interactive webpages.
Make stuff happen dynamically on the web page.
Interact with temporary storage, and local storage (Cookies, localStorage).
Send requests to the server, and retrieve data from it.
Provide a remote service for client-side applications, such as software registration, content
delivery, or remote multi-player gaming.
Also check here for more detail
Q46: define iOS feature of Block and also provide its syntax? (3 Marks)
Answer:
Blocks are a new feature that was introduced in iOS 4.0 and Mac OSX 10.6. Blocks can greatly
simplify code. They can help you reduce code, reduce dependency on delegates, and write cleaner,
more readable code.
A Block is a chunk of code that can be executed at some future time.
Blocks are first-class functions, which is a fancy way of saying that Blocks are regular Objective-C
objects. Since they’re objects, they can be passed as parameters, returned from methods and
functions, and assigned to variables.
Syntax: return_type (^block_name)(param_type, param_type, ...)
Q47: Name of Touch Events only three? (3 Marks)
Answer:
ontouchdown(e)
capturetouch(e)
ontouchmove(e)
Q48: write a not on Retain count and also its working and usage? (5 Marks)
Answer:
"Retain count rules. Init, new, copy in name. Assume you own. Any other means. Assume in
autorelease. If you dont own and want to make sure, call retain. No longer need and own than release
or autorelease. When 0 count, dealloc called." - Direct from handbook, I have no idea what it means.
Answer:
Binding Modes:
One-Way
Two-Way
OneWayToSource
OneTime
One way : The target is updated whenever the source changes.
Two-Way Binding means change to either the target or source updates the other
OneWayToSource is the opposite of One-Way binding. the source is changed whenever the target
changes.
One-Time binding is like one-way except changes to the source are not reflected at the target. The
target retains a snapshot of the source at the time the Binding is initiated.
Answer:
"a bundle is a directory that allows related resources such as an application's executable and its
graphics to be grouped together, appearing as a single file to the user." - Wikipedia
Q51: Can the operating system distinguish between windows with WPF contents and windows
with Win32 contents? /2
Answer:
Yes, we can even create Host WPF content in a Win32 window. and vice versa.
Q52: As we know that ICollectionView has a property called “filter” which provides the facility
for selective removal of itemsbased on an arbitrary condition.this property is also known as
Predicate<Object>type.What is meant by this Predicate<Object.type? /2
Answer:
Filtering gives a property Filter of type Predicate¡Object¿.
Q53: Can Operating System distinguish between window contain WPF and window Contain
Win32? (2 Marks)
Q54: what will be the efficient way of applying the same style on all p[aragraphs of HTML
page?also provide an example //3
Answer:
A technique is to collect all our CSS rules in one place, a style sheet, and then apply the style sheet to
every single element on the page. An embedded style sheet affects every element on the page. In order
to create an embedded style sheet, we need to go to the head of the document.
/span>html>
/span>head>
/span>title>Hello World</title>
/span>style type="text/css">
p {color: #008000; background: #ffff00}
</style>
</head>
/span>body>
/span>h1>Hello World</h1>
</body>
Q55: which property tells the location manager about how accurate the location finding should
be?and why the accuracy is important? /3
Answer:
[locationmanager setdesiredaccuracy:kcllocationaccuracybest];
Q54: we know that whatever we bind to a collection (anything that implements IEnumerable,a
default view is implicitly inserted between the source and target objects.you are required to
define the term “view’ and also the names of the items which are supported by it.. /3
Q56: how can you refresh the current page in WPF Navigation based application? /3
Answer:
This.navigationservice.Refresh();
Q58: define Term "View" and also write name of items that are supported by it? (3 Marks)
Note: Solve by yourself am not Responsible …………