我正在开发一个需要阅读远程pdf文件并打开它的Adnroid应用程序,我看到谷歌文档可以使用此网址从pdf进行转换:
http://docs.google.com/viewer?url=
我遇到的问题是我的url检索文件需要将标头添加到http请求.有没有人提示如何将这个添加到谷歌文档的调用中?
我目前正在通过Well Grounded Rubyist工作.到目前为止的好书.我被困在一些我不太喜欢红宝石的东西上.我有两个文件
在ModuleTester.rb中
class ModuleTester
include MyFirstModule
end
mt = ModuleTester.new
mt.say_hello
Run Code Online (Sandbox Code Playgroud)
在MyFirstModule.rb中
module MyFirstModule
def say_hello
puts "hello"
end
end
Run Code Online (Sandbox Code Playgroud)
当我运行'ruby ModuleTester.rb'时,我收到以下消息:
ModuleTester.rb:2:in <class:ModuleTester>': uninitialized constant ModuleTester::MyFirstModule (NameError)
from ModuleTester.rb:1:in'
根据我在网上找到的,当前目录不在命名空间中,因此无法查看该文件.但是,include语句不带字符串让我给出路径.由于include语句和require语句做了不同的事情,我绝对不知道如何让include语句识别模块.我查看了其他问题,但他们似乎都在使用require语句.非常感谢任何提示.
对于那些使用python进行web工作的人,我有一个问题.有人熟悉基于python的报告工具吗?我即将开始一个非常大的网络应用程序,并需要能够做一些最终用户报告(发票,收入报告等).它可以是现有的django应用程序或任何基于python的,所以我可以挂钩它.谢谢!
标记
我有一个Android UI问题,我不太清楚如何解决.我有一个tabhost,上面有几个不同的项目.在一种情况下,将动态添加添加到scrollView(位于其中一个选项卡上)的字段.我在屏幕底部有一个按钮,使用相对布局.问题是scrollview(和其他选项卡的线性布局)延伸到底部按钮之外.这导致屏幕上的最终字段是不可查看的,因为它被按钮隐藏.这是问题的屏幕截图以及我的布局的xml.任何帮助是极大的赞赏.
主要布局:
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_nologo" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" >
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
<View android:layout_width="fill_parent"
android:layout_height="2dip"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include layout="@layout/mc_message_send_tab_details"/>
<!-- Scrollview for message data -->
<ScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical"
android:id="@+id/formTab">
<!-- Form fields are automatically
created in McMessageViewActivity. -->
<LinearLayout android:id="@+id/formLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<View android:layout_width="fill_parent"
android:layout_height="5dip"/>
</LinearLayout>
</ScrollView>
</FrameLayout>
</LinearLayout>
<RelativeLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true" >
<Button android:text="Send"
android:id="@+id/btnSend" android:layout_weight="1" …Run Code Online (Sandbox Code Playgroud) 我有一个适用于我公司的大型Android应用程序,我们大量使用google maps api来显示位置,包括使用叠加层的活动.现在问题是支持低端Android平板电脑.由于大多数人不支持谷歌地图,我们的应用程序甚至不会安装在他们身上.是否有可能告诉清单只有在设备上可用时才需要google maps api?如果不可用,我会禁用映射功能.